Initialize HIP/rocsparse in constructor

This commit is contained in:
Tong Dong Qiu
2023-03-02 13:37:58 +01:00
parent 35ea8d7e30
commit ed8f37ec82
2 changed files with 20 additions and 16 deletions

View File

@@ -114,7 +114,7 @@ createBridge(const boost::property_tree::ptree& prm, std::unique_ptr<Opm::BdaBri
linsolver);
} catch (const std::logic_error& error) {
BOOST_WARN_MESSAGE(true, error.what());
if (strstr(error.what(), "HIP error: hipInit() failed") != nullptr)
if (strstr(error.what(), "HIP Error: could not get device") != nullptr)
throw HIPInitException(error.what());
else
throw error;