Skip to content

Commit

Permalink
set CMAKE_CUDA_ARCHITECTURES
Browse files Browse the repository at this point in the history
  • Loading branch information
wh3248 committed Jun 13, 2024
1 parent 654a793 commit 5a944ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ elseif(PARFLOW_ACCELERATOR_BACKEND STREQUAL "cuda")
else(CMAKE_CUDA_COMPILER)
message(FATAL_ERROR "ERROR: CUDA installation not found")
endif(CMAKE_CUDA_COMPILER)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 80)
endif()
else(NOT DEFINED KOKKOS_ROOT)
# Allow mixed use of CUDA and Kokkos for development purposes
find_package(Kokkos REQUIRED HINTS ${KOKKOS_ROOT})
Expand Down Expand Up @@ -292,7 +295,6 @@ if (${PARFLOW_ENABLE_HYPRE} OR DEFINED HYPRE_ROOT)

if(PARFLOW_ACCELERATOR_BACKEND STREQUAL "cuda")
find_package(CUDAToolkit REQUIRED)
set_property(CACHE CMAKE_CUDA_ARCHITECTURES PROPERTY STRINGS "80")
endif (PARFLOW_ACCELERATOR_BACKEND STREQUAL "cuda")

endif (${HYPRE_FOUND})
Expand Down

0 comments on commit 5a944ab

Please sign in to comment.