From 5466fdd289904e5785f7fc110d2f6dbf3085d572 Mon Sep 17 00:00:00 2001 From: Tong Dong Qiu Date: Thu, 20 Oct 2022 16:59:27 +0200 Subject: [PATCH] Add missing macro guards --- opm/simulators/linalg/ISTLSolverEbos.cpp | 8 ++++---- opm/simulators/linalg/ISTLSolverEbos.hpp | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/opm/simulators/linalg/ISTLSolverEbos.cpp b/opm/simulators/linalg/ISTLSolverEbos.cpp index cd78c00c3..bf0e0f177 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.cpp +++ b/opm/simulators/linalg/ISTLSolverEbos.cpp @@ -31,7 +31,7 @@ #include #include -#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL +#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL || HAVE_ROCALUTION #include #include #include @@ -171,7 +171,7 @@ void FlexibleSolverInfo::create(const Matrix& matrix, } } -#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL +#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL || HAVE_ROCALUTION template BdaSolverInfo:: BdaSolverInfo(const std::string& accelerator_mode, @@ -229,7 +229,7 @@ apply(Vector& rhs, auto wellContribs = WellContributions::create(accelerator_mode_, useWellConn); bridge_->initWellContributions(*wellContribs, x.N() * x[0].N()); - // the WellContributions can only be applied separately with CUDA or OpenCL, not with an FPGA or amgcl + // the WellContributions can only be applied separately with CUDA or OpenCL, not with an FPGA, amgcl or rocalution #if HAVE_CUDA || HAVE_OPENCL if (!useWellConn) { getContribs(*wellContribs); @@ -345,7 +345,7 @@ using CommunicationType = Dune::CollectiveCommunication; template void makeOverlapRowsInvalid>(BM&, const std::vector&); \ template struct FlexibleSolverInfo,BV,CommunicationType>; -#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL +#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL || HAVE_ROCALUTION #define INSTANCE(Dim) \ template struct BdaSolverInfo,BV>; \ template void BdaSolverInfo,BV>:: \ diff --git a/opm/simulators/linalg/ISTLSolverEbos.hpp b/opm/simulators/linalg/ISTLSolverEbos.hpp index 0858d6c49..a49c633af 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.hpp +++ b/opm/simulators/linalg/ISTLSolverEbos.hpp @@ -84,7 +84,7 @@ public: namespace Opm { -#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL +#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL || HAVE_ROCALUTION template class BdaBridge; class WellContributions; #endif @@ -113,7 +113,7 @@ struct FlexibleSolverInfo size_t interiorCellNum_ = 0; }; -#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL +#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL || HAVE_ROCALUTION template struct BdaSolverInfo { @@ -246,7 +246,7 @@ std::unique_ptr blockJacobiAdjacency(const Grid& grid, EWOMS_PARAM_IS_SET(TypeTag, int, LinearSolverMaxIter), EWOMS_PARAM_IS_SET(TypeTag, int, CprMaxEllIter)); -#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL +#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL || HAVE_ROCALUTION { std::string accelerator_mode = EWOMS_GET_PARAM(TypeTag, std::string, AcceleratorMode); if ((simulator_.vanguard().grid().comm().size() > 1) && (accelerator_mode != "none")) { @@ -394,7 +394,7 @@ std::unique_ptr blockJacobiAdjacency(const Grid& grid, // Use GPU if: available, chosen by user, and successful. // Use FPGA if: support compiled, chosen by user, and successful. -#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL +#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL || HAVE_ROCALUTION std::function getContribs = [this](WellContributions& w) { @@ -566,7 +566,7 @@ std::unique_ptr blockJacobiAdjacency(const Grid& grid, Matrix* matrix_; Vector *rhs_; -#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL +#if HAVE_CUDA || HAVE_OPENCL || HAVE_FPGA || HAVE_AMGCL || HAVE_ROCALUTION std::unique_ptr> bdaBridge; #endif