From 137f7063bef042985b75799f5c0882bdd7dd2913 Mon Sep 17 00:00:00 2001 From: David Huber Date: Mon, 11 Dec 2023 14:28:51 -0600 Subject: [PATCH 1/4] Initial port to Hercules. #22 --- modulefiles/gsiutils_hercules.lua | 26 ++++++++++++++++++++++++++ ush/detect_machine.sh | 2 ++ ush/module-setup.sh | 9 ++++++++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 modulefiles/gsiutils_hercules.lua diff --git a/modulefiles/gsiutils_hercules.lua b/modulefiles/gsiutils_hercules.lua new file mode 100644 index 00000000..a844eb6d --- /dev/null +++ b/modulefiles/gsiutils_hercules.lua @@ -0,0 +1,26 @@ +help([[ +]]) + +prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.5.1/envs/gsi-addon/install/modulefiles/Core") + +local stack_python_ver=os.getenv("python_ver") or "3.10.8" +local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.9.0" +local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.9.0" +local mkl_ver=os.getenv("mkl_ver") or "2022.2.1" +local cmake_ver=os.getenv("cmake_ver") or "3.23.1" +local prod_util_ver=os.getenv("prod_util_ver") or "1.2.2" + +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) +load(pathJoin("intel-oneapi-mkl", mkl_ver)) +load(pathJoin("python", stack_python_ver)) +load(pathJoin("cmake", cmake_ver)) + +load("gsiutils_common") + +load(pathJoin("prod_util", prod_util_ver)) + +pushenv("CFLAGS", "-xHOST") +pushenv("FFLAGS", "-xHOST") + +whatis("Description: GSI utilities environment on Orion with Intel Compilers") diff --git a/ush/detect_machine.sh b/ush/detect_machine.sh index ecd1ad53..1851ec6a 100755 --- a/ush/detect_machine.sh +++ b/ush/detect_machine.sh @@ -25,6 +25,8 @@ case $(hostname -f) in Orion-login-[1-4].HPC.MsState.Edu) MACHINE_ID=orion ;; ### orion1-4 + Hercules-login-[1-4].HPC.MsState.Edu) MACHINE_ID=hercules ;; ### hercules1-4 + cheyenne[1-6].cheyenne.ucar.edu) MACHINE_ID=cheyenne ;; ### cheyenne1-6 cheyenne[1-6].ib0.cheyenne.ucar.edu) MACHINE_ID=cheyenne ;; ### cheyenne1-6 chadmin[1-6].ib0.cheyenne.ucar.edu) MACHINE_ID=cheyenne ;; ### cheyenne1-6 diff --git a/ush/module-setup.sh b/ush/module-setup.sh index 469fd4a3..a62d95be 100755 --- a/ush/module-setup.sh +++ b/ush/module-setup.sh @@ -18,7 +18,14 @@ elif [[ $MACHINE_ID = hera* ]] ; then elif [[ $MACHINE_ID = orion* ]] ; then # We are on Orion if ( ! eval module help > /dev/null 2>&1 ) ; then - source /apps/lmod/init/bash + source /apps/lmod/lmod/init/bash + fi + module purge + +elif [[ $MACHINE_ID = hercules* ]] ; then + # We are on Hercules + if ( ! eval module help > /dev/null 2>&1 ) ; then + source /apps/other/lmod/lmod/init/bash fi module purge From 6c378572983d81894e7fd12dda206155805d099e Mon Sep 17 00:00:00 2001 From: David Huber Date: Mon, 18 Dec 2023 13:19:07 -0600 Subject: [PATCH 2/4] Perform unification when possible. --- ci/spack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/spack.yaml b/ci/spack.yaml index c79c3268..ad26cf3f 100644 --- a/ci/spack.yaml +++ b/ci/spack.yaml @@ -24,4 +24,4 @@ spack: - cmake@3.20.1 view: true concretizer: - unify: true + unify: when_possible From fe8e43993e41c7a120d71f0dfe27724fed43ee0f Mon Sep 17 00:00:00 2001 From: David Huber Date: Mon, 18 Dec 2023 13:55:42 -0600 Subject: [PATCH 3/4] Upgrade sp in CI. --- ci/spack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/spack.yaml b/ci/spack.yaml index ad26cf3f..2b119df8 100644 --- a/ci/spack.yaml +++ b/ci/spack.yaml @@ -12,7 +12,7 @@ spack: - bufr@11.7.0 - bacio@2.4.1 - w3emc@2.10.0 - - sp@2.3.3 + - sp@2.5.0 - ip@4.3.0 - sigio@2.3.2 - sfcio@1.4.1 From d20aaeb35767d6c24560c5d54d45a9c72e5c5ba2 Mon Sep 17 00:00:00 2001 From: David Huber Date: Mon, 18 Dec 2023 14:06:14 -0600 Subject: [PATCH 4/4] Update detect_machine.sh for Hercules. #107 --- ush/detect_machine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/detect_machine.sh b/ush/detect_machine.sh index 1851ec6a..9454998f 100755 --- a/ush/detect_machine.sh +++ b/ush/detect_machine.sh @@ -25,7 +25,7 @@ case $(hostname -f) in Orion-login-[1-4].HPC.MsState.Edu) MACHINE_ID=orion ;; ### orion1-4 - Hercules-login-[1-4].HPC.MsState.Edu) MACHINE_ID=hercules ;; ### hercules1-4 + [Hh]ercules-login-[1-4].[Hh][Pp][Cc].[Mm]s[Ss]tate.[Ed]du) MACHINE_ID=hercules ;; ### hercules1-4 cheyenne[1-6].cheyenne.ucar.edu) MACHINE_ID=cheyenne ;; ### cheyenne1-6 cheyenne[1-6].ib0.cheyenne.ucar.edu) MACHINE_ID=cheyenne ;; ### cheyenne1-6