diff --git a/CMakeLists.txt b/CMakeLists.txt index c6a49a628..6ba525ec9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,6 +239,8 @@ if(hip_FOUND) if(rocsparse_FOUND AND rocblas_FOUND) set(HAVE_ROCSPARSE 1) set(COMPILE_BDA_BRIDGE 1) + else() + unset(HAVE_ROCSPARSE) endif() if(${CXX_COMPILER} STREQUAL "hipcc") find_package(rocalution) @@ -569,8 +571,8 @@ if(ROCALUTION_FOUND) endif() if(rocsparse_FOUND AND rocblas_FOUND) - target_link_libraries( opmsimulators PUBLIC rocsparse ) - target_link_libraries( opmsimulators PUBLIC rocblas ) + target_link_libraries( opmsimulators PUBLIC roc::rocsparse ) + target_link_libraries( opmsimulators PUBLIC roc::rocblas ) endif() if(VexCL_FOUND) diff --git a/opm/simulators/linalg/bda/BdaBridge.cpp b/opm/simulators/linalg/bda/BdaBridge.cpp index e3752133e..3722825d4 100644 --- a/opm/simulators/linalg/bda/BdaBridge.cpp +++ b/opm/simulators/linalg/bda/BdaBridge.cpp @@ -101,7 +101,7 @@ BdaBridge::BdaBridge(std::string acceler use_gpu = true; // should be replaced by a 'use_bridge' boolean backend.reset(new Opm::Accelerator::rocsparseSolverBackend(linear_solver_verbosity, maxit, tolerance, platformID, deviceID)); #else - OPM_THROW(std::logic_error, "Error openclSolver was chosen, but rocsparse was not found by CMake"); + OPM_THROW(std::logic_error, "Error rocsparseSolver was chosen, but rocsparse/rocblas was not found by CMake"); #endif } else if (accelerator_mode.compare("none") == 0) { use_gpu = false;