mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
CUDA and HIP not allowed at the same time
This commit is contained in:
parent
dcc3bd70f0
commit
7673118f14
@ -312,6 +312,13 @@ macro (files_hook)
|
||||
set(HDF5_FOUND OFF)
|
||||
unset(HAVE_HDF5)
|
||||
endif()
|
||||
if(HAVE_ROCSPARSE AND HAVE_CUDA)
|
||||
message(WARNING "WARNING! Using CUDA and HIP at the same time is not allowed. Please choose only one of them. Disabling both...\n")
|
||||
set(CUDA_FOUND OFF)
|
||||
set(rocsparse_FOUND OFF)
|
||||
unset(HAVE_CUDA)
|
||||
unset(HAVE_ROCSPARSE)
|
||||
endif()
|
||||
# read the list of components from this file (in the project directory);
|
||||
# it should set various lists with the names of the files to include
|
||||
# include needs to be here to make reset HDF5_FOUND available in
|
||||
|
@ -151,11 +151,6 @@ if (Damaris_FOUND AND MPI_FOUND)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/utils/initDamarisXmlFile.cpp)
|
||||
endif()
|
||||
if(CUDA_FOUND)
|
||||
if(USE_BDA_BRIDGE)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/cuda/cusparseSolverBackend.cu)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/cuda/cuWellContributions.cu)
|
||||
endif()
|
||||
|
||||
# CUISTL SOURCE
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/cuistl/detail/CuBlasHandle.cpp)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/cuistl/detail/CuSparseHandle.cpp)
|
||||
@ -222,6 +217,10 @@ if(USE_BDA_BRIDGE)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/rocsparseSolverBackend.cpp)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/rocsparseWellContributions.cpp)
|
||||
endif()
|
||||
if(CUDA_FOUND)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/cuda/cusparseSolverBackend.cu)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/cuda/cuWellContributions.cu)
|
||||
endif()
|
||||
if(amgcl_FOUND)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/amgclSolverBackend.cpp)
|
||||
if(CUDA_FOUND)
|
||||
|
Loading…
Reference in New Issue
Block a user