Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/bartgol/eamxx/snl-gh-container…
Browse files Browse the repository at this point in the history
…s' into bartgol/add-ghci-mach
  • Loading branch information
bartgol committed Sep 13, 2024
2 parents ed8454f + 8257686 commit 4e6b19d
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
10 changes: 10 additions & 0 deletions components/eamxx/cmake/machine-files/ghci-cuda.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Common settings for our ghci images
include(${CMAKE_CURRENT_LIST_DIR}/ghci.cmake)

# Set SCREAM_MACHINE
set(SCREAM_MACHINE ghci-openmp CACHE STRING "")

# Set OpenMP backend
set(EKAT_MACH_FILES_PATH ${CMAKE_CURRENT_LIST_DIR}/../../../../externals/ekat/cmake/machine-files)
include (${EKAT_MACH_FILES_PATH}/kokkos/cuda.cmake)
include (${EKAT_MACH_FILES_PATH}/kokkos/nvidia-v100.cmake)
9 changes: 9 additions & 0 deletions components/eamxx/cmake/machine-files/ghci-openmp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Common settings for our ghci images
include(${CMAKE_CURRENT_LIST_DIR}/ghci.cmake)

# Set SCREAM_MACHINE
set(SCREAM_MACHINE ghci-openmp CACHE STRING "")

# Set OpenMP backend
set(EKAT_MACH_FILES_PATH ${CMAKE_CURRENT_LIST_DIR}/../../../../externals/ekat/cmake/machine-files)
include (${EKAT_MACH_FILES_PATH}/kokkos/openmp.cmake)
9 changes: 9 additions & 0 deletions components/eamxx/cmake/machine-files/ghci-serial.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Common settings for our ghci images
include(${CMAKE_CURRENT_LIST_DIR}/ghci.cmake)

# Set SCREAM_MACHINE
set(SCREAM_MACHINE ghci-serial CACHE STRING "")

# Set OpenMP backend
set(EKAT_MACH_FILES_PATH ${CMAKE_CURRENT_LIST_DIR}/../../../../externals/ekat/cmake/machine-files)
include (${EKAT_MACH_FILES_PATH}/kokkos/serial.cmake)
12 changes: 12 additions & 0 deletions components/eamxx/cmake/machine-files/ghci.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Set Fortran flags
set(CMAKE_Fortran_FLAGS "-fallow-argument-mismatch" CACHE STRING "Fortran compiler flags" FORCE)

# Set the path to SCREAM input data
set(SCREAM_INPUT_ROOT /projects/e3sm/inputdata CACHE PATH "Path to SCREAM input data" FORCE)

# Set the path to BLAS/LAPACK libraries
set(BLAS_LIBRARIES "/spack-installs/netlib-lapack/3.11.0/gcc/12.3.0/base/65x6uge/lib64/libblas.so" CACHE STRING "Path to BLAS library" FORCE)
set(LAPACK_LIBRARIES "/spack-installs/netlib-lapack/3.11.0/gcc/12.3.0/base/65x6uge/lib64/liblapack.so" CACHE STRING "Path to LAPACK library" FORCE)

# Let's catch usage of code deprecated in Kokkos 4
option (Kokkos_ENABLE_DEPRECATED_CODE_4 "" OFF)
16 changes: 16 additions & 0 deletions components/eamxx/scripts/machines_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,19 @@
"linux-generic" : ([],["mpicxx","mpifort","mpicc"],"", ""),
"linux-generic-debug" : ([],["mpicxx","mpifort","mpicc"],"", ""),
"linux-generic-serial" : ([],["mpicxx","mpifort","mpicc"],"", ""),

"ghci-serial" : ([],
["mpicxx","mpifort","mpicc"],
"",
"/projects/e3sm/baselines"),
"ghci-openmp" : ([],
["mpicxx","mpifort","mpicc"],
"",
"/projects/e3sm/baselines"),
"ghci-cuda" : ([],
["mpicxx","mpifort","mpicc"],
"",
"/projects/e3sm/baselines"),
}

if pathlib.Path("~/.cime/scream_mach_specs.py").expanduser().is_file(): # pylint: disable=no-member
Expand Down Expand Up @@ -232,6 +245,9 @@ def is_cuda_machine(machine):
###############################################################################
assert_machine_supported(machine)

if machine=="ghci-cuda":
return True

env_setup_raw = MACHINE_METADATA[machine][0]
env_setup_str = " ".join(env_setup_raw)

Expand Down

0 comments on commit 4e6b19d

Please sign in to comment.