Skip to content

Commit

Permalink
just check MACHINE_ID is noaacloud or not shuold be enough on CSPs
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuang-jedi committed Oct 18, 2024
1 parent 2584c5f commit 8f65f5c
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions ush/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,11 @@ elif [[ $MACHINE_ID = discover* ]]; then
export PATH=$PATH:$SPACK_ROOT/bin
. $SPACK_ROOT/share/spack/setup-env.sh

elif [[ ${MACHINE_ID} = noaacloud ]] ; then
# We are on NOAA Cloud
module purge

else
if [[ ! -v PW_CSP ]]; then
echo WARNING: UNKNOWN PLATFORM 1>&2
elif [[ -z "${PW_CSP}" ]]; then
echo WARNING: UNKNOWN PLATFORM 1>&2
else
if [[ "${PW_CSP}" == "aws" || "${PW_CSP}" == "azure" || "${PW_CSP}" == "google" ]]; then
module purge
else
echo WARNING: UNKNOWN PLATFORM 1>&2
fi
fi
echo WARNING: UNKNOWN PLATFORM 1>&2

fi

0 comments on commit 8f65f5c

Please sign in to comment.