Skip to content

Commit

Permalink
Use module reset and fix Orion build (#15)
Browse files Browse the repository at this point in the history
* Use module reset on Hera, Orion, Jet, and S4 in module-setup.sh
* Update modulepath and hpc module for Orion

Refs #13 & #14
  • Loading branch information
KateFriedman-NOAA authored Oct 25, 2022
1 parent 32cd997 commit 56e6880
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions modulefiles/gfsutils_orion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ help([[
Build environment for GFS utilities on Orion
]])

prepend_path("MODULEPATH", "/apps/contrib/NCEP/libs/hpc-stack/modulefiles/stack")
prepend_path("MODULEPATH", "/apps/contrib/NCEP/hpc-stack/libs/hpc-stack/modulefiles/stack")

local hpc_ver=os.getenv("hpc_ver") or "1.1.0"
local hpc_ver=os.getenv("hpc_ver") or "1.2.0"
local hpc_intel_ver=os.getenv("hpc_intel_ver") or "2018.4"
local hpc_impi_ver=os.getenv("hpc_impi_ver") or "2018.4"
local cmake_ver=os.getenv("cmake_ver") or "3.22.1"
Expand Down
12 changes: 8 additions & 4 deletions ush/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,32 @@ if [[ $MACHINE_ID = jet* ]] ; then
if ( ! eval module help > /dev/null 2>&1 ) ; then
source /apps/lmod/lmod/init/bash
fi
module purge
export LMOD_SYSTEM_DEFAULT_MODULES=contrib
module reset

elif [[ $MACHINE_ID = hera* ]] ; then
# We are on NOAA Hera
if ( ! eval module help > /dev/null 2>&1 ) ; then
source /apps/lmod/lmod/init/bash
fi
module purge
export LMOD_SYSTEM_DEFAULT_MODULES=contrib
module reset

elif [[ $MACHINE_ID = orion* ]] ; then
# We are on Orion
if ( ! eval module help > /dev/null 2>&1 ) ; then
source /apps/lmod/init/bash
fi
module purge
export LMOD_SYSTEM_DEFAULT_MODULES=contrib
module reset

elif [[ $MACHINE_ID = s4* ]] ; then
# We are on SSEC Wisconsin S4
if ( ! eval module help > /dev/null 2>&1 ) ; then
source /usr/share/lmod/lmod/init/bash
fi
module purge
export LMOD_SYSTEM_DEFAULT_MODULES=license_intel
module reset

elif [[ $MACHINE_ID = wcoss2 ]]; then
# We are on WCOSS2
Expand Down

0 comments on commit 56e6880

Please sign in to comment.