From 7836e5578e6cdd281a90621bea4945ee044bc56b Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Fri, 28 Jun 2024 11:05:06 -0400 Subject: [PATCH] update modules on orion for rocky 8. gempak is not available --- modulefiles/gfsutils_orion.intel.lua | 11 ++++++++--- modulefiles/rdbfmsua_orion.intel.lua | 11 ++++++++--- ush/build.sh | 9 ++++++++- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/modulefiles/gfsutils_orion.intel.lua b/modulefiles/gfsutils_orion.intel.lua index 8eb29c2b..76323579 100644 --- a/modulefiles/gfsutils_orion.intel.lua +++ b/modulefiles/gfsutils_orion.intel.lua @@ -2,10 +2,15 @@ help([[ Build environment for GFS utilities on Orion ]]) -prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/gsi-addon-env/install/modulefiles/Core") +-- Spack Stack installation specs +local ss_dir="/work/noaa/epic/role-epic/spack-stack/orion" +local ss_ver=os.getenv("stack_ver") or "1.6.0" +local ss_env=os.getenv("stack_env") or "gsi-addon-env-rocky9" -local stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2" -local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" +prepend_path("MODULEPATH", pathJoin(ss_dir, "spack-stack-" .. ss_ver, "envs", ss_env, "install/modulefiles/Core")) + +local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.9.0" +local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.9.0" local cmake_ver=os.getenv("cmake_ver") or "3.23.1" load(pathJoin("stack-intel", stack_intel_ver)) diff --git a/modulefiles/rdbfmsua_orion.intel.lua b/modulefiles/rdbfmsua_orion.intel.lua index 5a80bee4..9b9a1987 100644 --- a/modulefiles/rdbfmsua_orion.intel.lua +++ b/modulefiles/rdbfmsua_orion.intel.lua @@ -2,10 +2,15 @@ help([[ Build environment for GFS utilities on Orion ]]) -prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/gsi-addon-env/install/modulefiles/Core") +-- Spack Stack installation specs +local ss_dir="/work/noaa/epic/role-epic/spack-stack/orion" +local ss_ver=os.getenv("stack_ver") or "1.6.0" +local ss_env=os.getenv("stack_env") or "gsi-addon-env-rocky9" -local stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2" -local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1" +prepend_path("MODULEPATH", pathJoin(ss_dir, "spack-stack-" .. ss_ver, "envs", ss_env, "install/modulefiles/Core")) + +local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.9.0" +local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.9.0" load(pathJoin("stack-intel", stack_intel_ver)) load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) diff --git a/ush/build.sh b/ush/build.sh index ede4ebe9..2c79db8b 100755 --- a/ush/build.sh +++ b/ush/build.sh @@ -48,7 +48,14 @@ module use "${DIR_ROOT}/modulefiles" if module load "rdbfmsua_${MACHINE_ID}.${COMPILER}" &> /dev/null; then module list else - echo "WARNING: Unable to load modelfile for 'rdbfmsua' on '${MACHINE_ID}' (does it exist?)." + if [[ -f "${DIR_ROOT}/modulefiles/rdbfmsua_${MACHINE_ID}.${COMPILER}.lua" ]]; then + echo "WARNING: Unable to load modulefile for 'rdbfmsua' on '${MACHINE_ID}'." + set +e + module load "rdbfmsua_${MACHINE_ID}.${COMPILER}" + set -e + else + echo "${DIR_ROOT}/modulefiles/rdbfmsua_${MACHINE_ID}.${COMPILER}.lua does not exist!" + fi echo " Skipping building 'rdbfmsua.x'" exit 0 fi