provide 3 presets for KOKKOS compilation: serial, openmp, cuda

This commit is contained in:
Axel Kohlmeyer 2020-04-10 12:16:56 -04:00
parent 28379e145f
commit df2ddcc98a
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
3 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,9 @@
# preset that enables KOKKOS and selects CUDA compilation with OpenMP enabled as well
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "" FORCE)
set(BUILD_OMP ON CACHE BOOL "" FORCE)
get_filename_component(NVCC_WRAPPER_CMD ${CMAKE_CURRENT_SOURCE_DIR}/../lib/kokkos/bin/nvcc_wrapper ABSOLUTE)
set(CMAKE_CXX_COMPILER ${NVCC_WRAPPER_CMD} CACHE FILEPATH "" FORCE)

View File

@ -0,0 +1,6 @@
# preset that enables KOKKOS and selects OpenMP (only) compilation
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
set(BUILD_OMP ON CACHE BOOL "" FORCE)

View File

@ -0,0 +1,5 @@
# preset that enables KOKKOS and selects serial compilation only
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_OPENMP OFF CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)