From 9bf31a66fdec95246d7741d6cae0a6dc89bb00af Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Apr 2020 22:28:21 -0400 Subject: [PATCH] select compute capability 5.0 as default for Kokkos+CUDA preset. --- cmake/presets/kokkos-cuda.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/presets/kokkos-cuda.cmake b/cmake/presets/kokkos-cuda.cmake index 8195e0f090..36d099479d 100644 --- a/cmake/presets/kokkos-cuda.cmake +++ b/cmake/presets/kokkos-cuda.cmake @@ -1,9 +1,11 @@ -# preset that enables KOKKOS and selects CUDA compilation with OpenMP enabled as well - +# preset that enables KOKKOS and selects CUDA compilation with OpenMP +# enabled as well. This preselects CC 5.0 as default GPU arch, since +# that is compatible with all higher CC, but not the default CC 3.5 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(Kokkos_ARCH_MAXWELL50 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)