From 47946a8ddc99a2a2dcc33559077ed8dead2b19bf Mon Sep 17 00:00:00 2001 From: Aaron Donahue Date: Mon, 25 Mar 2024 09:25:14 -0700 Subject: [PATCH] Add compiler flags to perlmutter cmake to enable use of mlcorrection --- components/eamxx/cmake/machine-files/pm-cpu.cmake | 2 ++ components/eamxx/cmake/machine-files/pm-gpu.cmake | 3 +++ 2 files changed, 5 insertions(+) diff --git a/components/eamxx/cmake/machine-files/pm-cpu.cmake b/components/eamxx/cmake/machine-files/pm-cpu.cmake index ef66da562f0..1a34af6d7e2 100644 --- a/components/eamxx/cmake/machine-files/pm-cpu.cmake +++ b/components/eamxx/cmake/machine-files/pm-cpu.cmake @@ -16,3 +16,5 @@ if ("${PROJECT_NAME}" STREQUAL "E3SM") else() set(CMAKE_Fortran_FLAGS "-fallow-argument-mismatch" CACHE STRING "" FORCE) # only works with gnu v10 and above endif() + +option (SCREAM_ENABLE_ML_CORRECTION "Whether to enable ML correction parametrization" ON) diff --git a/components/eamxx/cmake/machine-files/pm-gpu.cmake b/components/eamxx/cmake/machine-files/pm-gpu.cmake index 7654d75138f..5ccc771f1a5 100644 --- a/components/eamxx/cmake/machine-files/pm-gpu.cmake +++ b/components/eamxx/cmake/machine-files/pm-gpu.cmake @@ -20,6 +20,7 @@ include (${EKAT_MACH_FILES_PATH}/mpi/srun.cmake) #option(Kokkos_ARCH_AMPERE80 "" ON) set(CMAKE_CXX_FLAGS "-DTHRUST_IGNORE_CUB_VERSION_CHECK" CACHE STRING "" FORCE) +execute_process(COMMAND conda activate /global/common/software/m4492/fv3net-shared) #message(STATUS "pm-gpu CMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID} CMAKE_Fortran_COMPILER_VERSION=${CMAKE_Fortran_COMPILER_VERSION}") if ("${PROJECT_NAME}" STREQUAL "E3SM") @@ -31,3 +32,5 @@ if ("${PROJECT_NAME}" STREQUAL "E3SM") else() set(CMAKE_Fortran_FLAGS "-fallow-argument-mismatch" CACHE STRING "" FORCE) # only works with gnu v10 and above endif() + +option (SCREAM_ENABLE_ML_CORRECTION "Whether to enable ML correction parametrization" ON)