fixed: no device handling in test_cusparseSolver

the exception is not thrown while setting up the bridge as in
opencl. rather the exception is thrown in the solve_system call.
This commit is contained in:
Arne Morten Kvarving 2021-11-12 10:29:26 +01:00
parent e25caba8ed
commit 069882f3e4

View File

@ -85,14 +85,18 @@ testCusparseSolver(const boost::property_tree::ptree& prm, const std::string& ma
std::unique_ptr<Opm::BdaBridge<Matrix, Vector, bz> > bridge;
try {
bridge = std::make_unique<Opm::BdaBridge<Matrix, Vector, bz> >(gpu_mode, fpga_bitstream, linear_solver_verbosity, maxit, tolerance, platformID, deviceID, opencl_ilu_reorder);
bridge->solve_system(&matrix, rhs, *wellContribs, result);
bridge->get_result(x);
return x;
} catch (const std::logic_error& error) {
BOOST_WARN_MESSAGE(true, error.what());
throw DeviceInitException(error.what());
if (strstr(error.what(), "Could not get device") != nullptr)
throw DeviceInitException(error.what());
else
throw error;
}
bridge->solve_system(&matrix, rhs, *wellContribs, result);
bridge->get_result(x);
return x;
}
namespace pt = boost::property_tree;