mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-13 17:32:03 -05:00
Allow CMake to set CHOW_PATEL variables
This commit is contained in:
1 parent
920eeee426
commit
803a2ac2f4
3 files changed
+35
-13
No files matched your search
@@ -26,6 +26,9 @@ option(BUILD_FLOW_POLY_GRID "Build flow blackoil with polyhedral grid" OFF)
|
||||
option(OPM_ENABLE_PYTHON "Enable python bindings?" OFF)
|
||||
option(OPM_ENABLE_PYTHON_TESTS "Enable tests for the python bindings?" ON)
|
||||
option(ENABLE_FPGA "Enable FPGA kernels integration?" OFF)
|
||||
option(USE_CHOW_PATEL_ILU "Use the iterative ILU by Chow and Patel?" OFF)
|
||||
option(USE_CHOW_PATEL_ILU_GPU "Run iterative ILU decomposition on GPU? Requires USE_CHOW_PATEL_ILU" OFF)
|
||||
option(USE_CHOW_PATEL_ILU_GPU_PARALLEL "Try to use more parallelism on the GPU during the iterative ILU decomposition? Requires USE_CHOW_PATEL_ILU_GPU_PARALLEL" OFF)
|
||||
|
||||
if(SIBLING_SEARCH AND NOT opm-common_DIR)
|
||||
# guess the sibling dir
|
||||
@@ -211,6 +214,24 @@ if(OpenCL_FOUND)
|
||||
set(OpenCL_FOUND OFF)
|
||||
set(OPENCL_FOUND OFF)
|
||||
endif()
|
||||
if(USE_CHOW_PATEL_ILU)
|
||||
add_compile_options(-DCHOW_PATEL=1)
|
||||
if(USE_CHOW_PATEL_ILU_GPU)
|
||||
add_compile_options(-DCHOW_PATEL_GPU=1)
|
||||
if(USE_CHOW_PATEL_ILU_GPU_PARALLEL)
|
||||
add_compile_options(-DCHOW_PATEL_GPU_PARALLEL=1)
|
||||
else()
|
||||
add_compile_options(-DCHOW_PATEL_GPU_PARALLEL=0)
|
||||
endif()
|
||||
else()
|
||||
add_compile_options(-DCHOW_PATEL_GPU=0)
|
||||
add_compile_options(-DCHOW_PATEL_GPU_PARALLEL=0)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
if(USE_CHOW_PATEL_ILU)
|
||||
message(FATAL_ERROR " CHOW_PATEL_ILU only works for openclSolver, but OpenCL was not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(amgcl)
|
||||
@@ -242,6 +263,7 @@ if(OpenCL_FOUND)
|
||||
endif()
|
||||
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 (CMakeLists_files.cmake)
|
||||
|
||||
Reference in new issue
Block a user