Skip to content

Commit

Permalink
Merge remote-tracking branch 'emc/develop' into remove-old-icing-seve…
Browse files Browse the repository at this point in the history
…rity
  • Loading branch information
SamuelTrahanNOAA committed Sep 15, 2023
2 parents 7b183b7 + 3bf982e commit 4686c36
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 0 deletions.
56 changes: 56 additions & 0 deletions modulefiles/gaea.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
help([[
This module loads libraries required for building and running UPP
on the NOAA RDHPC machine Gaea using Intel-2022.0.2
]])

whatis([===[Loads libraries needed for building the UPP on Gaea ]===])

load_any(pathJoin("cmake", os.getenv("cmake_ver") or "3.20.1"),"cmake")

prepend_path("MODULEPATH","/lustre/f2/dev/role.epic/contrib/hpc-stack/intel-classic-2022.0.2/modulefiles/stack")
load(pathJoin("hpc", os.getenv("hpc_ver") or "1.2.0"))

load(pathJoin("intel-classic", os.getenv("intel_classic_ver") or "2022.0.2"))
load(pathJoin("cray-mpich", os.getenv("cray_mpich_ver") or "7.7.20"))
load(pathJoin("hpc-intel-classic", os.getenv("hpc_intel_classic_ver") or "2022.0.2"))
load(pathJoin("hpc-cray-mpich", os.getenv("hpc_cray_mpich_ver") or "7.7.20"))
load(pathJoin("libpng", os.getenv("libpng_ver") or "1.6.37"))

-- Needed at runtime:
load("alps")

local ufs_modules = {
{["jasper"] = "2.0.25"},
{["zlib"] = "1.2.11"},
{["libpng"] = "1.6.37"},
{["hdf5"] = "1.10.6"},
{["netcdf"] = "4.7.4"},
{["pio"] = "2.5.7"},
{["esmf"] = "8.3.0b09"},
{["fms"] = "2022.04"},
{["bacio"] = "2.4.1"},
{["crtm"] = "2.4.0"},
{["g2"] = "3.4.5"},
{["g2tmpl"] = "1.10.2"},
{["ip"] = "3.3.3"},
{["sp"] = "2.3.3"},
{["w3emc"] = "2.9.2"},
{["gftl-shared"] = "v1.5.0"},
{["mapl"] = "2.22.0-esmf-8.3.0b09"},
{["nemsio"] = "2.5.4"},
{["sigio"] = "2.3.2"},
{["sfcio"] = "1.4.1"},
{["wrf_io"] = "1.2.0"},
}

for i = 1, #ufs_modules do
for name, default_version in pairs(ufs_modules[i]) do
local env_version_name = string.gsub(name, "-", "_") .. "_ver"
load(pathJoin(name, os.getenv(env_version_name) or default_version))
end
end

setenv("CC","cc")
setenv("FC","ftn")
setenv("CXX","CC")
setenv("CMAKE_Platform","gaea.intel")
58 changes: 58 additions & 0 deletions modulefiles/gaea_c5.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
help([[
This module loads libraries required for building and running UPP
on the NOAA RDHPC machine Gaea C5 using Intel-2023.1.0.
]])

whatis([===[Loads libraries needed for building the UPP on Gaea ]===])

load("PrgEnv-intel/8.3.3")
load("intel-classic/2023.1.0")
load("cray-mpich/8.1.25")
load("python/3.9.12")

prepend_path("MODULEPATH", "/lustre/f2/dev/wpo/role.epic/contrib/spack-stack/c5/spack-stack-dev-20230717/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/lustre/f2/dev/wpo/role.epic/contrib/spack-stack/c5/modulefiles")

stack_intel_ver=os.getenv("stack_intel_ver") or "2023.1.0"
load(pathJoin("stack-intel", stack_intel_ver))

stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "8.1.25"
load(pathJoin("stack-cray-mpich", stack_cray_mpich_ver))

stack_python_ver=os.getenv("stack_python_ver") or "3.9.12"
load(pathJoin("stack-python", stack_python_ver))

local ufs_modules = {
{["jasper"] = "2.0.32"},
{["zlib"] = "1.2.13"},
{["libpng"] = "1.6.37"},
{["hdf5"] = "1.14.0"},
{["netcdf-c"] = "4.9.2"},
{["netcdf-fortran"] = "4.6.0"},
{["bacio"] = "2.4.1"},
{["crtm"] = "2.4.0"},
{["g2"] = "3.4.5"},
{["g2tmpl"] = "1.10.2"},
{["ip"] = "3.3.3"},
{["nemsio"] = "2.5.4"},
{["sfcio"] = "1.4.1"},
{["sigio"] = "2.3.2"},
{["sp"] = "2.3.3"},
{["w3emc"] = "2.9.2"},
{["wrf-io"] = "1.2.0"},
}

for i = 1, #ufs_modules do
for name, default_version in pairs(ufs_modules[i]) do
local env_version_name = string.gsub(name, "-", "_") .. "_ver"
load(pathJoin(name, os.getenv(env_version_name) or default_version))
end
end

unload("darshan-runtime")
unload("cray-libsci")

setenv("CC","cc")
setenv("CXX","CC")
setenv("FC","ftn")
setenv("CMAKE_Platform","gaea_c5.intel")
18 changes: 18 additions & 0 deletions tests/compile_upp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ source ${PATHTR}/tests/detect_machine.sh
if [[ $MACHINE_ID != "unknown" ]]; then
if [ $MACHINE_ID == "wcoss2" -o $MACHINE_ID == "wcoss2_a" ]; then
module reset
elif [[ "$MACHINE_ID" =~ gaea.* ]] ; then
if [[ $( hostname ) =~ gaea5[0-9] ]] ; then
module purge
# Unset the read-only variables $PELOCAL_PRGENV and $RCLOCAL_PRGENV
gdb -ex 'call (int) unbind_variable("PELOCAL_PRGENV")' \
-ex 'call (int) unbind_variable("RCLOCAL_PRGENV")' \
--pid=$$ --batch
# Reload system default modules:
set +eu
source /etc/bash.bashrc.local
source /lustre/f2/dev/role.epic/contrib/Lmod_init.sh
set -eu
else
# There is no safe "module purge" on GAEA compute nodes.
set +eu
source /lustre/f2/dev/role.epic/contrib/Lmod_init.sh
set -eu
fi
else
module purge
fi
Expand Down
2 changes: 2 additions & 0 deletions tests/detect_machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ case $(hostname -f) in
gaea15.ncrc.gov) MACHINE_ID=gaea ;; ### gaea15
gaea16.ncrc.gov) MACHINE_ID=gaea ;; ### gaea16

gaea5[0-9]*) MACHINE_ID=gaea_c5 ;; ### GAEA C5 login node

hfe01) MACHINE_ID=hera ;; ### hera01
hfe02) MACHINE_ID=hera ;; ### hera02
hfe03) MACHINE_ID=hera ;; ### hera03
Expand Down

0 comments on commit 4686c36

Please sign in to comment.