From 9e4ca4889823494c6aaab33c7bf45f336df503fa Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Mon, 14 Aug 2023 12:07:59 -0400 Subject: [PATCH 1/3] require CMake 3.20+ --- CMakeLists.txt | 6 +----- README.md | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d80199989..2c72792f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.20) project(QuokkaCode VERSION 1.0 DESCRIPTION "Radiation hydrodynamics with structured AMR" LANGUAGES CXX C) @@ -40,10 +40,6 @@ if(AMReX_GPU_BACKEND MATCHES "CUDA") endif() set(CMAKE_CUDA_ARCHITECTURES 70 80 CACHE STRING "") - - if(CMAKE_VERSION VERSION_LESS 3.20) - include(AMReX_SetupCUDA) - endif(CMAKE_VERSION VERSION_LESS 3.20) endif(AMReX_GPU_BACKEND MATCHES "CUDA") if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") diff --git a/README.md b/README.md index f807ad4c1..97e8bb50f 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Quokka also features advanced Adaptive Quokka Refinement:tm: technology: ## Dependencies * C++ compiler (with C++17 support) -* CMake 3.16+ +* CMake 3.20+ * MPI library with GPU-aware support (OpenMPI, MPICH, or Cray MPI) * HDF5 1.10+ (serial version) * CUDA 11.7+ (optional, for NVIDIA GPUs) From 2a135f0bf5cb7189b04b02f4524e77a4cb9e667d Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Thu, 31 Aug 2023 14:09:01 -0400 Subject: [PATCH 2/3] use string with semicolon --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c72792f2..41b2613ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ if(AMReX_GPU_BACKEND MATCHES "CUDA") message(FATAL_ERROR "You must use CUDA version 11.7 or newer to compile Quokka. All previous CUDA versions have compiler bugs that cause Quokka to crash.") endif() - set(CMAKE_CUDA_ARCHITECTURES 70 80 CACHE STRING "") + set(CMAKE_CUDA_ARCHITECTURES "70;80" CACHE STRING "") endif(AMReX_GPU_BACKEND MATCHES "CUDA") if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") From dd74bfd439dd506b5e9dfe2e1ca5b33cd0ca74ec Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Thu, 31 Aug 2023 15:57:02 -0400 Subject: [PATCH 3/3] set CUDA_ARCHITECTURES explicitly --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 41b2613ea..47992587b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ if(AMReX_GPU_BACKEND MATCHES "CUDA") endif() set(CMAKE_CUDA_ARCHITECTURES "70;80" CACHE STRING "") + set(CUDA_ARCHITECTURES "70;80" CACHE STRING "") endif(AMReX_GPU_BACKEND MATCHES "CUDA") if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")