mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Make sure amgcl can be used without CUDA
This commit is contained in:
@@ -265,9 +265,12 @@ namespace Opm
|
||||
WellContributions wellContribs(accelerator_mode, useWellConn_);
|
||||
bdaBridge->initWellContributions(wellContribs);
|
||||
|
||||
// the WellContributions can only be applied separately with CUDA or OpenCL, not with an FPGA or amgcl
|
||||
#if HAVE_CUDA || HAVE_OPENCL
|
||||
if (!useWellConn_) {
|
||||
simulator_.problem().wellModel().getWellContributions(wellContribs);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Const_cast needed since the CUDA stuff overwrites values for better matrix condition..
|
||||
bdaBridge->solve_system(const_cast<Matrix*>(&getMatrix()), *rhs_, wellContribs, result);
|
||||
|
||||
@@ -30,18 +30,19 @@
|
||||
|
||||
#include <amgcl/amg.hpp>
|
||||
#include <amgcl/backend/builtin.hpp>
|
||||
#include <amgcl/backend/cuda.hpp>
|
||||
#include <amgcl/relaxation/cusparse_ilu0.hpp>
|
||||
#include <amgcl/adapter/crs_tuple.hpp>
|
||||
#include <amgcl/make_block_solver.hpp>
|
||||
#include <amgcl/relaxation/as_preconditioner.hpp>
|
||||
#include <amgcl/relaxation/ilu0.hpp>
|
||||
#include <amgcl/solver/bicgstab.hpp>
|
||||
|
||||
#include <amgcl/preconditioner/runtime.hpp>
|
||||
|
||||
#include <amgcl/value_type/static_matrix.hpp>
|
||||
|
||||
#if HAVE_CUDA
|
||||
#include <amgcl/backend/cuda.hpp>
|
||||
#include <amgcl/relaxation/cusparse_ilu0.hpp>
|
||||
#endif
|
||||
|
||||
#define AMGCL_CUDA 0
|
||||
|
||||
namespace bda
|
||||
|
||||
Reference in New Issue
Block a user