From f1461fcbc2412314ab270b3a0c743a1c985db4bb Mon Sep 17 00:00:00 2001 From: Wei Huang Date: Mon, 10 Jun 2024 14:42:18 +0000 Subject: [PATCH] remove extra changes --- sorc/machine-setup.sh | 42 ++++++++---------------------------------- 1 file changed, 8 insertions(+), 34 deletions(-) diff --git a/sorc/machine-setup.sh b/sorc/machine-setup.sh index c59a7ce7a..af65b30d0 100644 --- a/sorc/machine-setup.sh +++ b/sorc/machine-setup.sh @@ -38,43 +38,17 @@ elif [[ -d /scratch1 ]] ; then fi target=hera module purge -elif [[ -d /lustre && -d /ncrc ]] ; then +elif [[ -d /gpfs && -d /ncrc ]] ; then # We are on GAEA. if ( ! eval module help > /dev/null 2>&1 ) ; then - # We cannot simply load the module command. The GAEA - # /etc/profile modifies a number of module-related variables - # before loading the module command. Without those variables, - # the module command fails. Hence we actually have to source - # /etc/profile here. - source /etc/profile - __ms_source_etc_profile=yes - else - __ms_source_etc_profile=no - fi - module purge > /dev/null 2>&1 - module purge -# clean up after purge - unset _LMFILES_ - unset _LMFILES_000 - unset _LMFILES_001 - unset LOADEDMODULES - module load modules - if [[ -d /opt/cray/ari/modulefiles ]] ; then - module use -a /opt/cray/ari/modulefiles - fi - if [[ -d /opt/cray/pe/ari/modulefiles ]] ; then - module use -a /opt/cray/pe/ari/modulefiles - fi - if [[ -d /opt/cray/pe/craype/default/modulefiles ]] ; then - module use -a /opt/cray/pe/craype/default/modulefiles - fi - if [[ -s /etc/opt/cray/pe/admin-pe/site-config ]] ; then - source /etc/opt/cray/pe/admin-pe/site-config - fi - if [[ "$__ms_source_etc_profile" == yes ]] ; then + # We cannot simply load the module command. The GAEA + # /etc/profile modifies a number of module-related variables + # before loading the module command. Without those variables, + # the module command fails. Hence we actually have to source + # /etc/profile here. source /etc/profile - unset __ms_source_etc_profile fi + module reset target=gaea elif [[ "$(hostname)" =~ "Orion" ]]; then target="orion" @@ -102,7 +76,7 @@ else echo WARNING: UNKNOWN PLATFORM 1>&2; exit 99 else if [[ "${PW_CSP}" == "aws" || "${PW_CSP}" == "azure" || "${PW_CSP}" == "google" ]]; then - target=noaacloud + target=noaacloud module purge else echo WARNING: UNSUPPORTED CSP PLATFORM 1>&2