Skip to content

Commit

Permalink
Transition Gaea F2 to F5 + Cleanup (#896)
Browse files Browse the repository at this point in the history
* hera rocky8 and hercules python

* Add changes for Rocky8 on Hera.

* Add changes for rocky8 on jet.

* gaea f5 & hercules python

revert gaea_c5 to just gaea, update to spack stack 1.6.0, add python load to hercules

* update hercules python & cleanup detect_machine

* Update rt.sh

* Update detect_machine.sh comment cleanup

* Update detect_machine.sh

* Update detect_machine.sh (ufs weather model)

Adopted detect_machine.sh from the ufs-weather-model which should be more flexible in detecting the current machine.

* rm hera_c & fail message

* rm hera_c & hercules python load

* Update rt.sh hera rocky8

---------

Co-authored-by: Wen Meng <[email protected]>
  • Loading branch information
FernandoAndrade-NOAA and WenMeng-NOAA authored Mar 21, 2024
1 parent 15e2a8c commit 41023fd
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 250 deletions.
3 changes: 2 additions & 1 deletion ci/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if [ $mac2 = hf ]; then # for HERA
export machine=HERA
export homedir=${homedir:-"/scratch2/NAGAPE/epic/UPP/test_suite"}
export rundir=${rundir:-"/scratch1/NCEPDEV/stmp2/${USER}"}
module use /scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core
module use /scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core
module load stack-intel/2021.5.0
module load stack-intel-oneapi-mpi/2021.5.1
module load prod_util/2.1.1
Expand All @@ -85,6 +85,7 @@ elif [ $mac3 = herc ] ; then
module load stack-intel/2021.9.0
module load stack-intel-oneapi-mpi/2021.9.0
module load prod_util/2.1.1
module load stack-python/3.10.13
fi

#set working directory
Expand Down
58 changes: 0 additions & 58 deletions modulefiles/gaea-c5.lua

This file was deleted.

70 changes: 24 additions & 46 deletions modulefiles/gaea.lua
Original file line number Diff line number Diff line change
@@ -1,56 +1,34 @@
help([[
This module loads libraries required for building and running UPP
on the NOAA RDHPC machine Gaea using Intel-2022.0.2
on the NOAA RDHPC machine Gaea C5 using Intel-2023.1.0.
]])

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
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", "/ncrc/proj/epic/spack-stack/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/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.10.13"
load(pathJoin("stack-python", stack_python_ver))

load("upp_common")

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

setenv("CC","cc")
setenv("FC","ftn")
setenv("CXX","CC")
setenv("FC","ftn")

setenv("CMAKE_Platform","gaea.intel")
23 changes: 0 additions & 23 deletions modulefiles/hera_c.lua

This file was deleted.

3 changes: 3 additions & 0 deletions modulefiles/hercules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))
cmake_ver=os.getenv("cmake_ver") or "3.23.1"
load(pathJoin("cmake", cmake_ver))

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

load("upp_common")

setenv("CC","mpiicc")
Expand Down
24 changes: 6 additions & 18 deletions tests/compile_upp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,12 @@ 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
elif [[ "$MACHINE_ID" =~ gaea* ]] ; then
module reset
# 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
else
module purge
fi
Expand Down
Loading

0 comments on commit 41023fd

Please sign in to comment.