amgclSolverBackend: disable for float scalar

for reasons deep down in amgcl, it does not compile. for now
just disable it
This commit is contained in:
Arne Morten Kvarving
2024-08-23 11:02:23 +02:00
parent 7a3a79c11b
commit cdad4500c1
+11 -5
View File
@@ -50,7 +50,9 @@
#include <opm/simulators/linalg/bda/rocm/rocsparseSolverBackend.hpp>
#endif
typedef Dune::InverseOperatorResult InverseOperatorResult;
#include <type_traits>
using InverseOperatorResult = Dune::InverseOperatorResult;
namespace Opm {
@@ -95,10 +97,14 @@ BdaBridge(std::string accelerator_mode_,
#endif
} else if (accelerator_mode.compare("amgcl") == 0) {
#if HAVE_AMGCL
use_gpu = true; // should be replaced by a 'use_bridge' boolean
using AMGCL = Accelerator::amgclSolverBackend<Scalar,block_size>;
backend = std::make_unique<AMGCL>(linear_solver_verbosity, maxit,
tolerance, platformID, deviceID);
if constexpr (std::is_same_v<Scalar,float>) {
OPM_THROW(std::logic_error, "Error amgclSolver disabled with float Scalar");
} else {
use_gpu = true; // should be replaced by a 'use_bridge' boolean
using AMGCL = Accelerator::amgclSolverBackend<Scalar,block_size>;
backend = std::make_unique<AMGCL>(linear_solver_verbosity, maxit,
tolerance, platformID, deviceID);
}
#else
OPM_THROW(std::logic_error, "Error amgclSolver was chosen, but amgcl was not found by CMake");
#endif