Skip to content

Commit

Permalink
Add WCOSS2 block to module-setup.*.inc files
Browse files Browse the repository at this point in the history
- add if-block for NOAA Cactus and Dogwood to both module-setup.csh.inc
and module-setup.sh.inc
- source modules, purge modules, then load needed envvar/1.0 module to
unlock library stacks

Refs: NOAA-EMC#399
  • Loading branch information
KateFriedman-NOAA committed Sep 15, 2021
1 parent 3cbea42 commit 7b50947
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modulefiles/module-setup.csh.inc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ else if ( { test -L /usrx && sh -c "readlink /usrx 2> /dev/null | grep dell" } )
source /usrx/local/prod/lmod/lmod/init/$__ms_shell
endif
module purge
else if ( { test -d /lfs/h2 } ) then
# We are on NOAA Cactus or Dogwood
if ( ! { module help >& /dev/null } ) then
source /usr/share/lmod/lmod/init/$__ms_shell
fi
module purge
module load envvar/1.0
else if ( { test -d /glade } ) then
# We are on NCAR Yellowstone
if ( ! { module help >& /dev/null } ) then
Expand Down
8 changes: 8 additions & 0 deletions modulefiles/module-setup.sh.inc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ elif [[ -L /usrx && "$( readlink /usrx 2> /dev/null )" =~ dell ]] ; then
source /usrx/local/prod/lmod/lmod/init/$__ms_shell
fi
module purge
elif [[ -d /lfs/h2 ]] ; then
# We are on NOAA Cactus or Dogwood
if ( ! eval module help > /dev/null 2>&1 ) ; then
echo load the module command 1>&2
source /usr/share/lmod/lmod/init/$__ms_shell
fi
module purge
module load envvar/1.0
elif [[ -d /glade ]] ; then
# We are on NCAR Yellowstone
if ( ! eval module help > /dev/null 2>&1 ) ; then
Expand Down

0 comments on commit 7b50947

Please sign in to comment.