From caa273ac9b9233f7a5f17eba40b09f553c5e3034 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 14 Jun 2025 19:39:08 +0200 Subject: [PATCH 01/13] make sure that copied scripts in init/ and scripts/ use right EESSI version --- eb_hooks.py | 2 +- init/eessi_defaults | 4 +++- init/lmod/zsh | 2 +- init/modules/EESSI/2023.06.lua | 12 ++++++------ install_scripts.sh | 15 +++++++++++++++ 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 482ade4c..4775bd44 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -408,7 +408,7 @@ def parse_hook_zen4_module_only(ec, eprefix): # Need to escape newline character so that the newline character actually ends up in the module file # (otherwise, it splits the string, and a 2-line string ends up in the modulefile, resulting in syntax error) errmsg = "EasyConfigs using toolchains based on GCCcore-12.2.0 are not supported for the Zen4 architecture.\\n" - errmsg += "See https://www.eessi.io/docs/known_issues/eessi-2023.06/#gcc-1220-and-foss-2022b-based-modules-cannot-be-loaded-on-zen4-architecture" + errmsg += "See https://www.eessi.io/docs/known_issues/eessi-/#gcc-1220-and-foss-2022b-based-modules-cannot-be-loaded-on-zen4-architecture" ec['modluafooter'] = 'if (not os.getenv("%s")) then LmodError("%s") end' % (env_varname, errmsg) diff --git a/init/eessi_defaults b/init/eessi_defaults index 654a8294..4b0c9e9d 100644 --- a/init/eessi_defaults +++ b/init/eessi_defaults @@ -8,6 +8,8 @@ # license: GPLv2 # +export EESSI_VERSION_DEFAULT='__EESSI_VERSION_DEFAULT__' + # use different defaults for RISC-V, as we want to redirect to the riscv.eessi.io repo if [[ $(uname -m) == "riscv64" ]]; then export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/riscv.eessi.io}" @@ -20,7 +22,7 @@ if [[ $(uname -m) == "riscv64" ]]; then fi else export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/software.eessi.io}" - export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=2023.06}" + export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=${EESSI_VERSION_DEFAULT}}" fi # use archdetect by default, unless otherwise specified export EESSI_USE_ARCHDETECT="${EESSI_USE_ARCHDETECT:=1}" diff --git a/init/lmod/zsh b/init/lmod/zsh index bc6e8e4d..a1894108 100644 --- a/init/lmod/zsh +++ b/init/lmod/zsh @@ -1,7 +1,7 @@ # Choose an EESSI CVMFS repository EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}" # Choose an EESSI version -EESSI_VERSION="${EESSI_VERSION:-2023.06}" +EESSI_VERSION="${EESSI_VERSION:-__EESSI_VERSION_DEFAULT__}" # Path to top-level module tree export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules" . "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/zsh" diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index d5105e89..3f7ac996 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -80,18 +80,18 @@ local archdetect_accel = archdetect_accel() -- eessi_cpu_family is derived from the archdetect match, e.g., x86_64 local eessi_cpu_family = archdetect:match("([^/]+)") local eessi_software_subdir = archdetect --- eessi_eprefix is the base location of the compat layer, e.g., /cvmfs/software.eessi.io/versions/2023.06/compat/linux/x86_64 +-- eessi_eprefix is the base location of the compat layer, e.g., /cvmfs/software.eessi.io/versions//compat/linux/x86_64 local eessi_eprefix = pathJoin(eessi_prefix, "compat", eessi_os_type, eessi_cpu_family) -- eessi_software_path is the location of the software installations, e.g., --- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3 +-- /cvmfs/software.eessi.io/versions//software/linux/x86_64/amd/zen3 local eessi_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_software_subdir) local eessi_modules_subdir = pathJoin("modules", "all") -- eessi_module_path is the location of the _CPU_ module files, e.g., --- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3/modules/all +-- /cvmfs/software.eessi.io/versions//software/linux/x86_64/amd/zen3/modules/all local eessi_module_path = pathJoin(eessi_software_path, eessi_modules_subdir) local eessi_site_software_path = string.gsub(eessi_software_path, "versions", "host_injections") -- Site module path is the same as the EESSI one, but with `versions` changed to `host_injections`, e.g., --- /cvmfs/software.eessi.io/host_injections/2023.06/software/linux/x86_64/amd/zen3/modules/all +-- /cvmfs/software.eessi.io/host_injections//software/linux/x86_64/amd/zen3/modules/all local eessi_site_module_path = pathJoin(eessi_site_software_path, eessi_modules_subdir) setenv("EPREFIX", eessi_eprefix) eessiDebug("Setting EPREFIX to " .. eessi_eprefix) @@ -134,10 +134,10 @@ if not (archdetect_accel == nil or archdetect_accel == '') then -- The CPU subdirectory of the accelerator installations is _usually_ the same as host CPU, but this can be overridden eessi_accel_software_subdir = os.getenv("EESSI_ACCEL_SOFTWARE_SUBDIR_OVERRIDE") or eessi_software_subdir -- CPU location of the accelerator installations, e.g., - -- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3 + -- /cvmfs/software.eessi.io/versions//software/linux/x86_64/amd/zen3 eessi_accel_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_accel_software_subdir) -- location of the accelerator modules, e.g., - -- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3/accel/nvidia/cc80/modules/all + -- /cvmfs/software.eessi.io/versions//software/linux/x86_64/amd/zen3/accel/nvidia/cc80/modules/all eessi_module_path_accel = pathJoin(eessi_accel_software_path, archdetect_accel, eessi_modules_subdir) eessiDebug("Checking if " .. eessi_module_path_accel .. " exists") if isDir(eessi_module_path_accel) then diff --git a/install_scripts.sh b/install_scripts.sh index f4863686..32ea2114 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -183,3 +183,18 @@ hook_files=( eb_hooks.py ) copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${hook_files[@]}" + + +# make sure that scripts in init/ and scripts/ use correct EESSI version +sed -i "s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION}/g" ${INSTALL_PREFIX}/init/eessi_defaults + +# replace placeholder for default EESSI version in Lmod init scripts +for shell in $(ls ${INSTALL_PREFIX}/init/lmod); do + sed -i "s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION}/g" ${INSTALL_PREFIX}/init/lmod/${shell} +done + +# replace EESSI version used in comments in EESSI module +sed -i "s@//@/${EESSI_VERSION}/@g" ${INSTALL_PREFIX}/init/modules/EESSI/${EESSI_VERSION}.lua + +# replace EESSI version used in EasyBuild hooks +sed -i "s@//@/${EESSI_VERSION}/@g" ${INSTALL_PREFIX}/init/easybuild/eb_hooks.py From 2240702b41cb7274f135588e96efa349bae18e1c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 09:39:19 +0200 Subject: [PATCH 02/13] fix CI workflow for archdetect GPU by replacing s/__EESSI_VERSION_DEFAULT__/ placeholder in init/eessi_defaults --- .github/workflows/tests_archdetect_nvidia_gpu.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/tests_archdetect_nvidia_gpu.yml b/.github/workflows/tests_archdetect_nvidia_gpu.yml index 54827ecc..c526991c 100644 --- a/.github/workflows/tests_archdetect_nvidia_gpu.yml +++ b/.github/workflows/tests_archdetect_nvidia_gpu.yml @@ -17,6 +17,9 @@ jobs: - 2xa100 # cc80, supported with (atleast) zen2 CPU - 4xa100 # cc80, supported with (atleast) zen2 CPU - cc01 # non-existing GPU + EESSI_VERSION: + - '2023.06' + - '2025.06' fail-fast: false steps: - name: checkout @@ -31,6 +34,10 @@ jobs: cvmfs_http_proxy: DIRECT cvmfs_repositories: software.eessi.io + - name: Fix EESSI version in init scripts + run: | + sed -i "s/__EESSI_VERSION_DEFAULT__/${{matrix.EESSI_VERSION}}/g" init/eessi_defaults + - name: test accelerator detection run: | export EESSI_SOFTWARE_SUBDIR_OVERRIDE='x86_64/amd/zen2' From 7a3a54d4896aaeb2bced35b6593760f6fd45de6f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 09:43:23 +0200 Subject: [PATCH 03/13] fix check for eb_hooks.py being up-to-date --- .github/workflows/test-eb-hooks.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-eb-hooks.yml b/.github/workflows/test-eb-hooks.yml index e9aada40..ef636291 100644 --- a/.github/workflows/test-eb-hooks.yml +++ b/.github/workflows/test-eb-hooks.yml @@ -6,11 +6,14 @@ on: workflow_dispatch: permissions: contents: read # to fetch code (actions/checkout) -env: - EESSI_VERSION: '2023.06' jobs: check_eb_hooks: runs-on: ubuntu-24.04 + strategy: + matrix: + EESSI_VERSION: + - '2023.06' + - '2025.06' steps: - name: Check out software-layer repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -50,7 +53,10 @@ jobs: git show origin/${{ github.base_ref }}:$FILE > "$TEMP_FILE" fi + # replace placeholder (as is also done in install_scripts.sh) + sed -i "s//${{matrix.EESSI_VERSION}}/g" "${TEMP_FILE}" + # Compare the hooks to what is shipped in the repository - source /cvmfs/software.eessi.io/versions/${EESSI_VERSION}/init/bash + source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash module load EESSI-extend diff "$TEMP_FILE" "$EASYBUILD_HOOKS" From 42be6181cae0cc59a3a60818d9e0635ce154f4d1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 09:47:27 +0200 Subject: [PATCH 04/13] fix check for init scripts by replacing __EESSI_VERSION_DEFAULT__ ini init/eessi_defaults --- .github/workflows/tests_eessi_module.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index a7b38e22..27021944 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -84,6 +84,10 @@ jobs: cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb cvmfs_http_proxy: DIRECT cvmfs_repositories: software.eessi.io + + - name: Fix EESSI version in init scripts + run: | + sed -i "s/__EESSI_VERSION_DEFAULT__/${{matrix.EESSI_VERSION}}/g" init/eessi_defaults - name: Test for expected variables match between Lmod init script and original bash script run: | From 4af22b92f1addc15638ddc8f5ce3ba1b45b7d1cc Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 09:50:45 +0200 Subject: [PATCH 05/13] fix check for lmod init scripts by replacing __EESSI_VERSION_DEFAULT__ ini init/eessi_defaults --- .github/workflows/tests_init_module.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests_init_module.yml b/.github/workflows/tests_init_module.yml index d30da61c..70cb5497 100644 --- a/.github/workflows/tests_init_module.yml +++ b/.github/workflows/tests_init_module.yml @@ -27,6 +27,10 @@ jobs: cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb cvmfs_http_proxy: DIRECT cvmfs_repositories: software.eessi.io + + - name: Fix EESSI version in init scripts + run: | + sed -i "s/__EESSI_VERSION_DEFAULT__/${{matrix.EESSI_VERSION}}/g" init/eessi_defaults - name: Clone assert.sh script run: git clone https://github.com/lehmannro/assert.sh.git From 70e6cee45354bda8acd986135c8a486688b59f94 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 09:54:01 +0200 Subject: [PATCH 06/13] consistently use __EESSI_VERSION_DEFAULT__ in init/lmod scripts --- init/lmod/bash | 2 +- init/lmod/csh | 2 +- init/lmod/fish | 2 +- init/lmod/ksh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/init/lmod/bash b/init/lmod/bash index b2db9a88..8e17b0fb 100644 --- a/init/lmod/bash +++ b/init/lmod/bash @@ -1,7 +1,7 @@ # Choose an EESSI CVMFS repository EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}" # Choose an EESSI version -EESSI_VERSION="${EESSI_VERSION:-2023.06}" +EESSI_VERSION="${EESSI_VERSION:-__EESSI_VERSION_DEFAULT__}" # Path to top-level module tree export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules" . "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash" diff --git a/init/lmod/csh b/init/lmod/csh index f2e91002..82037d1d 100644 --- a/init/lmod/csh +++ b/init/lmod/csh @@ -1,7 +1,7 @@ # Choose an EESSI CVMFS repository if (! $?EESSI_CVMFS_REPO) then; set EESSI_CVMFS_REPO = "/cvmfs/software.eessi.io"; endif # Choose an EESSI version -if (! $?EESSI_VERSION) then; set EESSI_VERSION = "2023.06"; endif +if (! $?EESSI_VERSION) then; set EESSI_VERSION = "__EESSI_VERSION_DEFAULT__"; endif # Path to top-level module tree setenv MODULEPATH "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules" source "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/csh" diff --git a/init/lmod/fish b/init/lmod/fish index 46cd7cac..4cf9bde2 100644 --- a/init/lmod/fish +++ b/init/lmod/fish @@ -1,7 +1,7 @@ # Choose an EESSI CVMFS repository set EESSI_CVMFS_REPO (set -q EESSI_CVMFS_REPO; and echo "$EESSI_CVMFS_REPO"; or echo "/cvmfs/software.eessi.io") # Choose an EESSI version -set EESSI_VERSION (set -q EESSI_VERSION; and echo "$EESSI_VERSION"; or echo "2023.06") +set EESSI_VERSION (set -q EESSI_VERSION; and echo "$EESSI_VERSION"; or echo "__EESSI_VERSION_DEFAULT__") # Path to top-level module tree set -x MODULEPATH "$EESSI_CVMFS_REPO"/versions/"$EESSI_VERSION"/init/modules . "$EESSI_CVMFS_REPO"/versions/"$EESSI_VERSION"/compat/linux/(uname -m)/usr/share/Lmod/init/fish diff --git a/init/lmod/ksh b/init/lmod/ksh index 7d9a05d6..9a934aa5 100644 --- a/init/lmod/ksh +++ b/init/lmod/ksh @@ -1,7 +1,7 @@ # Choose an EESSI CVMFS repository EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}" # Choose an EESSI version -EESSI_VERSION="${EESSI_VERSION:-2023.06}" +EESSI_VERSION="${EESSI_VERSION:-__EESSI_VERSION_DEFAULT__}" # Path to top-level module tree export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules" . "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/ksh" From aab372e8d34c43daec6eb416b551171d5b00f75f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 10:03:20 +0200 Subject: [PATCH 07/13] don't hardcode 2023.06 in archdetect GPU CI workflow --- .github/workflows/tests_archdetect_nvidia_gpu.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests_archdetect_nvidia_gpu.yml b/.github/workflows/tests_archdetect_nvidia_gpu.yml index c526991c..759e7b31 100644 --- a/.github/workflows/tests_archdetect_nvidia_gpu.yml +++ b/.github/workflows/tests_archdetect_nvidia_gpu.yml @@ -75,7 +75,7 @@ jobs: match=$(grep "${pattern}" init.out || true) test "x${match}" = "x" || (echo "unexpected match found for '${pattern}' in init output" && exit 1) - pattern="Prepending /cvmfs/software.eessi.io/versions/2023.06/software/linux/.*/accel/.*/modules/all to \$MODULEPATH" + pattern="Prepending /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/software/linux/.*/accel/.*/modules/all to \$MODULEPATH" echo ">>> checking for lack of pattern '${pattern}' in init output..." match=$(grep "${pattern}" init.out || true) test "x${match}" = "x" || (echo "unexpected match found for '${pattern}' in init output" && exit 1) @@ -86,7 +86,7 @@ jobs: echo ">>> checking for pattern '${pattern}' in init output..." grep "${pattern}" init.out || (echo "FAILED 1" || exit 1) - pattern="Prepending /cvmfs/software.eessi.io/versions/2023.06/software/linux/.*/accel/.*/modules/all to \$MODULEPATH" + pattern="Prepending /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/software/linux/.*/accel/.*/modules/all to \$MODULEPATH" echo ">>> checking for lack of pattern '${pattern}' in init output..." match=$(grep "${pattern}" init.out || true) test "x${match}" = "x" || (echo "unexpected match found for '${pattern}' in init output" && exit 1) @@ -94,11 +94,11 @@ jobs: else echo ">>> checking for 'accel/nvidia/cc80' in init output..." grep "archdetect found supported accelerator for CPU target x86_64/amd/zen2: accel/nvidia/cc80" init.out || (echo "FAILED 2" && exit 1) - grep "Prepending /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen2/accel/nvidia/cc80/modules/all to \$MODULEPATH" init.out || (echo "FAILED 3" && exit 1) + grep "Prepending /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/software/linux/x86_64/amd/zen2/accel/nvidia/cc80/modules/all to \$MODULEPATH" init.out || (echo "FAILED 3" && exit 1) fi echo ">>> checking last line of init output..." - tail -1 init.out | grep "Environment set up to use EESSI (2023.06), have fun!" || (echo "FAILED, full init utput:" && cat init.out && exit 1) + tail -1 init.out | grep "Environment set up to use EESSI (${{matrix.EESSI_VERSION}}), have fun!" || (echo "FAILED, full init utput:" && cat init.out && exit 1) echo "All checks on init output PASSED" else @@ -125,7 +125,7 @@ jobs: echo ">>> checking for 'accel/nvidia/cc80' in init output..." grep "archdetect found supported accelerator for CPU target x86_64/amd/zen3: accel/nvidia/cc80" init.out || (echo "FAILED 1" && exit 1) grep "Using x86_64/amd/zen2 as software subdirectory" init.out || (echo "FAILED 2" && exit 1) - grep "Prepending /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen2/modules/all to \$MODULEPATH" init.out || (echo "FAILED 3" && exit 1) - grep "Prepending /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3/accel/nvidia/cc80/modules/all to \$MODULEPATH" init.out || (echo "FAILED 4" && exit 1) + grep "Prepending /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/software/linux/x86_64/amd/zen2/modules/all to \$MODULEPATH" init.out || (echo "FAILED 3" && exit 1) + grep "Prepending /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/software/linux/x86_64/amd/zen3/accel/nvidia/cc80/modules/all to \$MODULEPATH" init.out || (echo "FAILED 4" && exit 1) echo "All checks on init output PASSED" From 7c1b204177463c049d2f647b4a10b809686de23a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 10:03:49 +0200 Subject: [PATCH 08/13] run tests for EESSI module and lmod init scripts for both EESSI 2023.06 and 2025.06 --- .github/workflows/tests_eessi_module.yml | 9 ++++++--- .github/workflows/tests_init_module.yml | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 27021944..f4333385 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -13,7 +13,8 @@ jobs: fail-fast: false matrix: EESSI_VERSION: - - 2023.06 + - '2023.06' + - '2025.06' steps: - name: Check out software-layer repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -68,7 +69,8 @@ jobs: fail-fast: false matrix: EESSI_VERSION: - - 2023.06 + - '2023.06' + - '2025.06' EESSI_SOFTWARE_SUBDIR_OVERRIDE: - x86_64/amd/zen3 - x86_64/amd/zen4 @@ -145,7 +147,8 @@ jobs: fail-fast: false matrix: EESSI_VERSION: - - 2023.06 + - '2023.06' + - '2025.06' EESSI_SOFTWARE_SUBDIR_OVERRIDE: - none - x86_64/amd/zen2 diff --git a/.github/workflows/tests_init_module.yml b/.github/workflows/tests_init_module.yml index 70cb5497..5ae60cec 100644 --- a/.github/workflows/tests_init_module.yml +++ b/.github/workflows/tests_init_module.yml @@ -14,7 +14,8 @@ jobs: fail-fast: false matrix: EESSI_VERSION: - - 2023.06 + - '2023.06' + - '2025.06' EESSI_SOFTWARE_SUBDIR_OVERRIDE: - x86_64/intel/haswell steps: From 3f5393fbe97487a22da55d209a4afe517ed9e5a0 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 10:09:26 +0200 Subject: [PATCH 09/13] don't run CI workflows for EESSI 2025.06 just yet, since scripts have not been deployed yet for that version --- .github/workflows/test-eb-hooks.yml | 1 - .github/workflows/tests_archdetect_nvidia_gpu.yml | 1 - .github/workflows/tests_eessi_module.yml | 3 --- .github/workflows/tests_init_module.yml | 1 - 4 files changed, 6 deletions(-) diff --git a/.github/workflows/test-eb-hooks.yml b/.github/workflows/test-eb-hooks.yml index ef636291..57b0d650 100644 --- a/.github/workflows/test-eb-hooks.yml +++ b/.github/workflows/test-eb-hooks.yml @@ -13,7 +13,6 @@ jobs: matrix: EESSI_VERSION: - '2023.06' - - '2025.06' steps: - name: Check out software-layer repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 diff --git a/.github/workflows/tests_archdetect_nvidia_gpu.yml b/.github/workflows/tests_archdetect_nvidia_gpu.yml index 759e7b31..6effda64 100644 --- a/.github/workflows/tests_archdetect_nvidia_gpu.yml +++ b/.github/workflows/tests_archdetect_nvidia_gpu.yml @@ -19,7 +19,6 @@ jobs: - cc01 # non-existing GPU EESSI_VERSION: - '2023.06' - - '2025.06' fail-fast: false steps: - name: checkout diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index f4333385..e9726d76 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -14,7 +14,6 @@ jobs: matrix: EESSI_VERSION: - '2023.06' - - '2025.06' steps: - name: Check out software-layer repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -70,7 +69,6 @@ jobs: matrix: EESSI_VERSION: - '2023.06' - - '2025.06' EESSI_SOFTWARE_SUBDIR_OVERRIDE: - x86_64/amd/zen3 - x86_64/amd/zen4 @@ -148,7 +146,6 @@ jobs: matrix: EESSI_VERSION: - '2023.06' - - '2025.06' EESSI_SOFTWARE_SUBDIR_OVERRIDE: - none - x86_64/amd/zen2 diff --git a/.github/workflows/tests_init_module.yml b/.github/workflows/tests_init_module.yml index 5ae60cec..652bc096 100644 --- a/.github/workflows/tests_init_module.yml +++ b/.github/workflows/tests_init_module.yml @@ -15,7 +15,6 @@ jobs: matrix: EESSI_VERSION: - '2023.06' - - '2025.06' EESSI_SOFTWARE_SUBDIR_OVERRIDE: - x86_64/intel/haswell steps: From 9c8e65f6948911d578c490120ba4703fa6b258c3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 10:16:33 +0200 Subject: [PATCH 10/13] also define $EESSI_VERSION_DEFAULT in lmod init scripts --- init/lmod/bash | 3 ++- init/lmod/csh | 3 ++- init/lmod/fish | 3 ++- init/lmod/ksh | 3 ++- init/lmod/zsh | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/init/lmod/bash b/init/lmod/bash index 8e17b0fb..daba8351 100644 --- a/init/lmod/bash +++ b/init/lmod/bash @@ -1,7 +1,8 @@ # Choose an EESSI CVMFS repository EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}" # Choose an EESSI version -EESSI_VERSION="${EESSI_VERSION:-__EESSI_VERSION_DEFAULT__}" +EESSI_VERSION_DEFAULT="__EESSI_VERSION_DEFAULT__" +EESSI_VERSION="${EESSI_VERSION:-${EESSI_VERSION_DEFAULT}}" # Path to top-level module tree export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules" . "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash" diff --git a/init/lmod/csh b/init/lmod/csh index 82037d1d..28ad59e8 100644 --- a/init/lmod/csh +++ b/init/lmod/csh @@ -1,7 +1,8 @@ # Choose an EESSI CVMFS repository if (! $?EESSI_CVMFS_REPO) then; set EESSI_CVMFS_REPO = "/cvmfs/software.eessi.io"; endif # Choose an EESSI version -if (! $?EESSI_VERSION) then; set EESSI_VERSION = "__EESSI_VERSION_DEFAULT__"; endif +setenv EESSI_VERSION_DEFAULT "__EESSI_VERSION_DEFAULT__" +if (! $?EESSI_VERSION) then; set EESSI_VERSION = "${EESSI_VERSION_DEFAULT}"; endif # Path to top-level module tree setenv MODULEPATH "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules" source "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/csh" diff --git a/init/lmod/fish b/init/lmod/fish index 4cf9bde2..9e595441 100644 --- a/init/lmod/fish +++ b/init/lmod/fish @@ -1,7 +1,8 @@ # Choose an EESSI CVMFS repository set EESSI_CVMFS_REPO (set -q EESSI_CVMFS_REPO; and echo "$EESSI_CVMFS_REPO"; or echo "/cvmfs/software.eessi.io") # Choose an EESSI version -set EESSI_VERSION (set -q EESSI_VERSION; and echo "$EESSI_VERSION"; or echo "__EESSI_VERSION_DEFAULT__") +set EESSI_VERSION_DEFAULT "__EESSI_VERSION_DEFAULT__" +set EESSI_VERSION (set -q EESSI_VERSION; and echo "$EESSI_VERSION"; or echo "$EESSI_VERSION_DEFAULT") # Path to top-level module tree set -x MODULEPATH "$EESSI_CVMFS_REPO"/versions/"$EESSI_VERSION"/init/modules . "$EESSI_CVMFS_REPO"/versions/"$EESSI_VERSION"/compat/linux/(uname -m)/usr/share/Lmod/init/fish diff --git a/init/lmod/ksh b/init/lmod/ksh index 9a934aa5..ebf4c0ca 100644 --- a/init/lmod/ksh +++ b/init/lmod/ksh @@ -1,7 +1,8 @@ # Choose an EESSI CVMFS repository EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}" # Choose an EESSI version -EESSI_VERSION="${EESSI_VERSION:-__EESSI_VERSION_DEFAULT__}" +EESSI_VERSION_DEFAULT="__EESSI_VERSION_DEFAULT__" +EESSI_VERSION="${EESSI_VERSION:-${EESSI_VERSION_DEFAULT}}" # Path to top-level module tree export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules" . "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/ksh" diff --git a/init/lmod/zsh b/init/lmod/zsh index a1894108..dfdff0c7 100644 --- a/init/lmod/zsh +++ b/init/lmod/zsh @@ -1,7 +1,8 @@ # Choose an EESSI CVMFS repository EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}" # Choose an EESSI version -EESSI_VERSION="${EESSI_VERSION:-__EESSI_VERSION_DEFAULT__}" +EESSI_VERSION_DEFAULT="__EESSI_VERSION_DEFAULT__" +EESSI_VERSION="${EESSI_VERSION:-${EESSI_VERSION_DEFAULT}}" # Path to top-level module tree export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules" . "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/zsh" From 4f50bfad31e3947cd831f2d450e010a4863521e9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 10:21:07 +0200 Subject: [PATCH 11/13] fix replacing of s/__EESSI_VERSION_DEFAULT__/ placeholder in CI workflow to test init/lmod scripts --- .github/workflows/tests_init_module.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests_init_module.yml b/.github/workflows/tests_init_module.yml index 652bc096..381dba17 100644 --- a/.github/workflows/tests_init_module.yml +++ b/.github/workflows/tests_init_module.yml @@ -28,9 +28,11 @@ jobs: cvmfs_http_proxy: DIRECT cvmfs_repositories: software.eessi.io - - name: Fix EESSI version in init scripts + - name: Fix EESSI version in lmod init scripts run: | - sed -i "s/__EESSI_VERSION_DEFAULT__/${{matrix.EESSI_VERSION}}/g" init/eessi_defaults + for shell in $(ls init/lmod); do + sed -i "s/__EESSI_VERSION_DEFAULT__/${{matrix.EESSI_VERSION}}/g" init/lmod/${shell} + done - name: Clone assert.sh script run: git clone https://github.com/lehmannro/assert.sh.git From 3812bb7dcc44fa329e71a8d855ce894dec1e1412 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 10:28:35 +0200 Subject: [PATCH 12/13] also set $EESSI_VERSION_DEFAULT in EESSI modules --- init/modules/EESSI/2023.06.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 3f7ac996..899346b6 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -21,6 +21,7 @@ if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then end local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) local eessi_os_type = "linux" +setenv("EESSI_VERSION_DEFAULT", eessi_version) setenv("EESSI_VERSION", eessi_version) setenv("EESSI_CVMFS_REPO", eessi_repo) setenv("EESSI_OS_TYPE", eessi_os_type) From 6c8692edac01a55675f80fe72af8a289bec261e3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 15 Jun 2025 10:41:32 +0200 Subject: [PATCH 13/13] add comment on version placeholder replacements being done in install_scripts.sh --- install_scripts.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install_scripts.sh b/install_scripts.sh index 32ea2114..aa6c5866 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -184,6 +184,9 @@ hook_files=( ) copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${hook_files[@]}" +# replace version placeholders in scripts; +# note: the commands below are always run, regardless of whether the scripts were changed, +# but that should be fine (no changes are made if version placeholder is not present anymore) # make sure that scripts in init/ and scripts/ use correct EESSI version sed -i "s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION}/g" ${INSTALL_PREFIX}/init/eessi_defaults