From b103205b40933fcb7b19e74be4d5cd9a5ed82c3e Mon Sep 17 00:00:00 2001 From: Youngsung Kim Date: Sun, 2 Jun 2024 10:27:12 -0400 Subject: [PATCH 1/3] Matches Nvidia GPU compute capability (CC) version to cc80 on Perlmutter-GPU. --- cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake b/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake index 59758d59989c..852483663a09 100644 --- a/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake +++ b/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake @@ -6,8 +6,8 @@ if (COMP_NAME STREQUAL gptl) endif() string(APPEND CPPDEFS " -DTHRUST_IGNORE_CUB_VERSION_CHECK") string(APPEND CMAKE_CUDA_FLAGS " -ccbin CC -O2 -arch sm_80 --use_fast_math") -string(APPEND CMAKE_EXE_LINKER_FLAGS " -acc -gpu=cc70,cc60 -Minfo=accel") +string(APPEND CMAKE_EXE_LINKER_FLAGS " -acc -gpu=cc80 -Minfo=accel") set(SCC "cc") set(SCXX "CC") set(SFC "ftn") -string(APPEND CMAKE_Fortran_FLAGS " -acc -gpu=cc70,cc60 -Minfo=accel") +string(APPEND CMAKE_Fortran_FLAGS " -acc -gpu=cc80 -Minfo=accel") From 5f37229a2c50e6da2d832bc11f38120a939faeef Mon Sep 17 00:00:00 2001 From: noel Date: Thu, 13 Jun 2024 09:02:05 -0700 Subject: [PATCH 2/3] add CMAKE_CUDA_ARCHITECTURES as in gnugpu make same change for muller-gpu --- cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake | 8 ++++++++ .../machines/cmake_macros/nvidiagpu_muller-gpu.cmake | 5 +++-- cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake b/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake index 17c8066083bb..68f6648c9306 100644 --- a/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake +++ b/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake @@ -10,6 +10,14 @@ string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_AMPERE80=On -DKokkos_ENABLE_CUDA=On set(CMAKE_CUDA_ARCHITECTURES "80") string(APPEND CMAKE_C_FLAGS_RELEASE " -O2") string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -O2") + +#if (COMP_NAME STREQUAL elm) +# # don't build with ACC, default for GNU is not not build with ACC +#else() +# string(APPEND CMAKE_Fortran_FLAGS " -fopenacc") +# string(APPEND CMAKE_EXE_LINKER_FLAGS " -fopenacc") +#endif() + set(MPICC "cc") set(MPICXX "CC") set(MPIFC "ftn") diff --git a/cime_config/machines/cmake_macros/nvidiagpu_muller-gpu.cmake b/cime_config/machines/cmake_macros/nvidiagpu_muller-gpu.cmake index 59758d59989c..93c7cdd16b21 100644 --- a/cime_config/machines/cmake_macros/nvidiagpu_muller-gpu.cmake +++ b/cime_config/machines/cmake_macros/nvidiagpu_muller-gpu.cmake @@ -6,8 +6,9 @@ if (COMP_NAME STREQUAL gptl) endif() string(APPEND CPPDEFS " -DTHRUST_IGNORE_CUB_VERSION_CHECK") string(APPEND CMAKE_CUDA_FLAGS " -ccbin CC -O2 -arch sm_80 --use_fast_math") -string(APPEND CMAKE_EXE_LINKER_FLAGS " -acc -gpu=cc70,cc60 -Minfo=accel") +set(CMAKE_CUDA_ARCHITECTURES "80") +string(APPEND CMAKE_Fortran_FLAGS " -acc -gpu=cc80 -Minfo=accel") +string(APPEND CMAKE_EXE_LINKER_FLAGS " -acc -gpu=cc80 -Minfo=accel") set(SCC "cc") set(SCXX "CC") set(SFC "ftn") -string(APPEND CMAKE_Fortran_FLAGS " -acc -gpu=cc70,cc60 -Minfo=accel") diff --git a/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake b/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake index 852483663a09..93c7cdd16b21 100644 --- a/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake +++ b/cime_config/machines/cmake_macros/nvidiagpu_pm-gpu.cmake @@ -6,8 +6,9 @@ if (COMP_NAME STREQUAL gptl) endif() string(APPEND CPPDEFS " -DTHRUST_IGNORE_CUB_VERSION_CHECK") string(APPEND CMAKE_CUDA_FLAGS " -ccbin CC -O2 -arch sm_80 --use_fast_math") +set(CMAKE_CUDA_ARCHITECTURES "80") +string(APPEND CMAKE_Fortran_FLAGS " -acc -gpu=cc80 -Minfo=accel") string(APPEND CMAKE_EXE_LINKER_FLAGS " -acc -gpu=cc80 -Minfo=accel") set(SCC "cc") set(SCXX "CC") set(SFC "ftn") -string(APPEND CMAKE_Fortran_FLAGS " -acc -gpu=cc80 -Minfo=accel") From 578f1bd140b93653a54742d4db18c8e824509047 Mon Sep 17 00:00:00 2001 From: noel Date: Thu, 13 Jun 2024 09:03:51 -0700 Subject: [PATCH 3/3] remove comments accidentally committed --- cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake b/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake index 68f6648c9306..17c8066083bb 100644 --- a/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake +++ b/cime_config/machines/cmake_macros/gnugpu_pm-gpu.cmake @@ -10,14 +10,6 @@ string(APPEND KOKKOS_OPTIONS " -DKokkos_ARCH_AMPERE80=On -DKokkos_ENABLE_CUDA=On set(CMAKE_CUDA_ARCHITECTURES "80") string(APPEND CMAKE_C_FLAGS_RELEASE " -O2") string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -O2") - -#if (COMP_NAME STREQUAL elm) -# # don't build with ACC, default for GNU is not not build with ACC -#else() -# string(APPEND CMAKE_Fortran_FLAGS " -fopenacc") -# string(APPEND CMAKE_EXE_LINKER_FLAGS " -fopenacc") -#endif() - set(MPICC "cc") set(MPICXX "CC") set(MPIFC "ftn")