mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Added error checking to tests
This commit is contained in:
parent
393ab24154
commit
31eeb33039
@ -72,14 +72,18 @@ testCusparseSolver(const boost::property_tree::ptree& prm, const std::string& ma
|
||||
const int deviceID = 0;
|
||||
const std::string gpu_mode("cusparse");
|
||||
const std::string fpga_bitstream("empty"); // unused
|
||||
Dune::InverseOperatorResult result;
|
||||
|
||||
Vector x(rhs.size());
|
||||
Opm::WellContributions wellContribs("cusparse");
|
||||
Opm::BdaBridge<Matrix, Vector, bz> bridge(gpu_mode, fpga_bitstream, linear_solver_verbosity, maxit, tolerance, platformID, deviceID, opencl_ilu_reorder);
|
||||
Dune::InverseOperatorResult result;
|
||||
try {
|
||||
Opm::BdaBridge<Matrix, Vector, bz> bridge(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);
|
||||
bridge.solve_system(&matrix, rhs, wellContribs, result);
|
||||
bridge.get_result(x);
|
||||
} catch (const std::logic_error& error) {
|
||||
BOOST_WARN_MESSAGE(true, error.what());
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
@ -71,14 +71,18 @@ testOpenclSolver(const boost::property_tree::ptree& prm, const std::string& matr
|
||||
const int deviceID = 0;
|
||||
const std::string gpu_mode("opencl");
|
||||
const std::string fpga_bitstream("empty"); // unused
|
||||
Dune::InverseOperatorResult result;
|
||||
|
||||
Vector x(rhs.size());
|
||||
Opm::WellContributions wellContribs("opencl");
|
||||
Opm::BdaBridge<Matrix, Vector, bz> bridge(gpu_mode, fpga_bitstream, linear_solver_verbosity, maxit, tolerance, platformID, deviceID, opencl_ilu_reorder);
|
||||
Dune::InverseOperatorResult result;
|
||||
try {
|
||||
Opm::BdaBridge<Matrix, Vector, bz> bridge(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);
|
||||
bridge.solve_system(&matrix, rhs, wellContribs, result);
|
||||
bridge.get_result(x);
|
||||
} catch (const std::logic_error& error) {
|
||||
BOOST_WARN_MESSAGE(true, error.what());
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user