From 2584c5f32128ab7572f7c9c419b403428dfcf668 Mon Sep 17 00:00:00 2001 From: Wei Huang Date: Thu, 17 Oct 2024 19:30:47 +0000 Subject: [PATCH] get rid of WARNING: UNKNOWN PLATFORM on CSPs --- ush/module-setup.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ush/module-setup.sh b/ush/module-setup.sh index 6fd6ee7d..479a3434 100755 --- a/ush/module-setup.sh +++ b/ush/module-setup.sh @@ -86,5 +86,16 @@ elif [[ $MACHINE_ID = discover* ]]; then . $SPACK_ROOT/share/spack/setup-env.sh else - echo WARNING: UNKNOWN PLATFORM 1>&2 + 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 + fi