From 7ae01febe12ee76c334af831ccdbebb91bf8266d Mon Sep 17 00:00:00 2001 From: Richard Top Date: Mon, 12 Aug 2024 07:20:27 +0000 Subject: [PATCH 01/48] EESSI bash initialization to module file --- init/modules/EESSI/2023.06.lua | 55 ++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 init/modules/EESSI/2023.06.lua diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua new file mode 100644 index 0000000000..fcc4249ca1 --- /dev/null +++ b/init/modules/EESSI/2023.06.lua @@ -0,0 +1,55 @@ +help([[ +Description +=========== +The European Environment for Scientific Software Installations (EESSI, pronounced as easy) is a collaboration between different European partners in HPC community.The goal of this project is to build a common stack of scientific software installations for HPC systems and beyond, including laptops, personal workstations and cloud infrastructure. + +More information +================ + - URL: https://www.eessi.io/docs/ +]]) +whatis("Description: The European Environment for Scientific Software Installations (EESSI, pronounced as easy) is a collaboration between different European partners in HPC community. The goal of this project is to build a common stack of scientific software installations for HPC systems and beyond, including laptops, personal workstations and cloud infrastructure.") +whatis("URL: https://www.eessi.io/docs/:") + +local eessi_version = myModuleVersion() +local eessi_repo = "/cvmfs/software.eessi.io" +local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) +local eessi_os_type = "linux" +setenv("EESSI_VERSION", eessi_version) +setenv("EESSI_CVMFS_REPO", eessi_repo) +setenv("EESSI_OS_TYPE", eessi_os_type) +function archdetect_cpu() + local script = pathJoin(eessi_repo, 'versions', eessi_version, 'init', 'lmod_eessi_archdetect_wrapper.sh') + if not os.getenv("EESSI_ARCHDETECT_OPTIONS") then + if convertToCanonical(LmodVersion()) < convertToCanonical("8.6") then + LmodMessage("Loading this modulefile requires using Lmod version > 8.6, but you can export EESSI_ARCHDETECT_OPTIONS to the available cpu architecture in the form of: x86_64/intel/haswell or aarch64/neoverse_v1") + os.exit(1) + end + source_sh("bash", script) + end + for archdetect_filter_cpu in string.gmatch(os.getenv("EESSI_ARCHDETECT_OPTIONS"), "([^" .. ":" .. "]+)") do + if isDir(pathJoin(string.gsub(script, "init/lmod_eessi_archdetect_wrapper.sh", "software/" .. eessi_os_type), archdetect_filter_cpu)) then + return archdetect_filter_cpu + end + end + LmodError("Software directory check for the detected architecture failed") +end +local archdetect = archdetect_cpu() +local eessi_cpu_family = archdetect:match("([^/]+)") +local eessi_software_subdir = os.getenv("EESSI_SOFTWARE_SUBDIR_OVERRIDE") or archdetect +local eessi_eprefix = pathJoin(eessi_prefix, "compat", eessi_os_type, eessi_cpu_family) +local eessi_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_software_subdir) +local eessi_module_path = pathJoin(eessi_software_path, "modules/all") +setenv("EESSI_SITE_MODULEPATH", string.gsub(eessi_module_path, eessi_repo, "host_injections")) +setenv("EESSI_SOFTWARE_SUBDIR", eessi_software_subdir) +setenv("EESSI_PREFIX", eessi_prefix) +setenv("EESSI_EPREFIX", eessi_eprefix) +prepend_path("PATH", pathJoin(eessi_eprefix, "bin")) +prepend_path("PATH", pathJoin(eessi_eprefix, "usr/bin")) +setenv("EESSI_SOFTWARE_PATH", eessi_software_path) +setenv("EESSI_MODULEPATH", eessi_module_path) +prepend_path("MODULEPATH", os.getenv("EESSI_SITE_MODULEPATH") .. ":" .. os.getenv("EESSI_MODULEPATH")) +setenv("LMOD_CONFIG_DIR", pathJoin(eessi_software_path, ".lmod")) +setenv("LMOD_PACKAGE_PATH", pathJoin(eessi_software_path, ".lmod")) +if mode() == "load" then + LmodMessage("EESSI/" .. eessi_version .. " loaded successfully") +end From b099220c3a68d1643d872a4dd15f7adb9a62e84e Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:54:09 +0200 Subject: [PATCH 02/48] Update init/modules/EESSI/2023.06.lua Co-authored-by: ocaisa --- init/modules/EESSI/2023.06.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index fcc4249ca1..59c941efe2 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -18,7 +18,7 @@ setenv("EESSI_VERSION", eessi_version) setenv("EESSI_CVMFS_REPO", eessi_repo) setenv("EESSI_OS_TYPE", eessi_os_type) function archdetect_cpu() - local script = pathJoin(eessi_repo, 'versions', eessi_version, 'init', 'lmod_eessi_archdetect_wrapper.sh') + local script = pathJoin(eessi_prefix, 'init', 'lmod_eessi_archdetect_wrapper.sh') if not os.getenv("EESSI_ARCHDETECT_OPTIONS") then if convertToCanonical(LmodVersion()) < convertToCanonical("8.6") then LmodMessage("Loading this modulefile requires using Lmod version > 8.6, but you can export EESSI_ARCHDETECT_OPTIONS to the available cpu architecture in the form of: x86_64/intel/haswell or aarch64/neoverse_v1") From 2bfb7afbcd13e7915ab33e10eb68e5fa9d92353f Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:54:50 +0200 Subject: [PATCH 03/48] Update init/modules/EESSI/2023.06.lua Co-authored-by: ocaisa --- init/modules/EESSI/2023.06.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 59c941efe2..5180235b06 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -21,8 +21,7 @@ function archdetect_cpu() local script = pathJoin(eessi_prefix, 'init', 'lmod_eessi_archdetect_wrapper.sh') if not os.getenv("EESSI_ARCHDETECT_OPTIONS") then if convertToCanonical(LmodVersion()) < convertToCanonical("8.6") then - LmodMessage("Loading this modulefile requires using Lmod version > 8.6, but you can export EESSI_ARCHDETECT_OPTIONS to the available cpu architecture in the form of: x86_64/intel/haswell or aarch64/neoverse_v1") - os.exit(1) + LmodError("Loading this modulefile requires using Lmod version >= 8.6, but you can export EESSI_ARCHDETECT_OPTIONS to the available cpu architecture in the form of: x86_64/intel/haswell:x86_64/generic or aarch64/neoverse_v1:aarch64/generic") end source_sh("bash", script) end From e302e66c94110e3b039f6a6f3bf26ee6653999e0 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:56:04 +0200 Subject: [PATCH 04/48] Update init/modules/EESSI/2023.06.lua Co-authored-by: ocaisa --- init/modules/EESSI/2023.06.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 5180235b06..1a2c3a0d64 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -26,7 +26,7 @@ function archdetect_cpu() source_sh("bash", script) end for archdetect_filter_cpu in string.gmatch(os.getenv("EESSI_ARCHDETECT_OPTIONS"), "([^" .. ":" .. "]+)") do - if isDir(pathJoin(string.gsub(script, "init/lmod_eessi_archdetect_wrapper.sh", "software/" .. eessi_os_type), archdetect_filter_cpu)) then + if isDir(pathJoin(eessi_prefix, "software", eessi_os_type, archdetect_filter_cpu, "software")) then return archdetect_filter_cpu end end From 34d4d42043cc44124d0fe93dd7de2ff875402308 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:56:28 +0200 Subject: [PATCH 05/48] Update init/modules/EESSI/2023.06.lua Co-authored-by: ocaisa --- init/modules/EESSI/2023.06.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 1a2c3a0d64..d0d7e7bc5f 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -37,7 +37,8 @@ local eessi_cpu_family = archdetect:match("([^/]+)") local eessi_software_subdir = os.getenv("EESSI_SOFTWARE_SUBDIR_OVERRIDE") or archdetect local eessi_eprefix = pathJoin(eessi_prefix, "compat", eessi_os_type, eessi_cpu_family) local eessi_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_software_subdir) -local eessi_module_path = pathJoin(eessi_software_path, "modules/all") +local eessi_module_path = pathJoin(eessi_software_path, "modules", "all") +local eessi_site_module_path = string.gsub(eessi_module_path, "versions", "host_injections") setenv("EESSI_SITE_MODULEPATH", string.gsub(eessi_module_path, eessi_repo, "host_injections")) setenv("EESSI_SOFTWARE_SUBDIR", eessi_software_subdir) setenv("EESSI_PREFIX", eessi_prefix) From 6c23ec1a9358c701481606a4cfe6c9f583365569 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:57:26 +0200 Subject: [PATCH 06/48] Update init/modules/EESSI/2023.06.lua Co-authored-by: ocaisa --- init/modules/EESSI/2023.06.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index d0d7e7bc5f..5f74b969c6 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -47,7 +47,8 @@ prepend_path("PATH", pathJoin(eessi_eprefix, "bin")) prepend_path("PATH", pathJoin(eessi_eprefix, "usr/bin")) setenv("EESSI_SOFTWARE_PATH", eessi_software_path) setenv("EESSI_MODULEPATH", eessi_module_path) -prepend_path("MODULEPATH", os.getenv("EESSI_SITE_MODULEPATH") .. ":" .. os.getenv("EESSI_MODULEPATH")) +prepend_path("MODULEPATH", eessi_module_path) +prepend_path("MODULEPATH", eessi_site_module_path) setenv("LMOD_CONFIG_DIR", pathJoin(eessi_software_path, ".lmod")) setenv("LMOD_PACKAGE_PATH", pathJoin(eessi_software_path, ".lmod")) if mode() == "load" then From f3b29a841467f947acc14f7086031a1cd9894d5e Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:57:48 +0200 Subject: [PATCH 07/48] Update init/modules/EESSI/2023.06.lua Co-authored-by: ocaisa --- init/modules/EESSI/2023.06.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 5f74b969c6..989734f361 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -39,7 +39,7 @@ local eessi_eprefix = pathJoin(eessi_prefix, "compat", eessi_os_type, eessi_cpu_ local eessi_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_software_subdir) local eessi_module_path = pathJoin(eessi_software_path, "modules", "all") local eessi_site_module_path = string.gsub(eessi_module_path, "versions", "host_injections") -setenv("EESSI_SITE_MODULEPATH", string.gsub(eessi_module_path, eessi_repo, "host_injections")) +setenv("EESSI_SITE_MODULEPATH", eessi_site_module_path) setenv("EESSI_SOFTWARE_SUBDIR", eessi_software_subdir) setenv("EESSI_PREFIX", eessi_prefix) setenv("EESSI_EPREFIX", eessi_eprefix) From 8ead05fbe52b59a33645c2a986c29824f10f9358 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 12 Aug 2024 15:12:00 +0200 Subject: [PATCH 08/48] Update 2023.06.lua Added zen4 redirection --- init/modules/EESSI/2023.06.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 989734f361..c6091c5be6 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -27,6 +27,15 @@ function archdetect_cpu() end for archdetect_filter_cpu in string.gmatch(os.getenv("EESSI_ARCHDETECT_OPTIONS"), "([^" .. ":" .. "]+)") do if isDir(pathJoin(eessi_prefix, "software", eessi_os_type, archdetect_filter_cpu, "software")) then + -- use x86_64/amd/zen3 for now when AMD Genoa (Zen4) CPU is detected, + -- since optimized software installations for Zen4 are a work-in-progress, + -- see https://gitlab.com/eessi/support/-/issues/37 + if archdetect_filter_cpu == "x86_64/amd/zen4" then + archdetect_filter_cpu = "x86_64/amd/zen3" + if mode() == "load" then + LmodMessage("Sticking to " .. archdetect_filter_cpu .. " for now, since optimized installations for AMD Genoa (Zen4) are a work in progress.") + end + end return archdetect_filter_cpu end end From 824ffafcc7e3a77089b484ca935be4a294af1975 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:58:34 +0200 Subject: [PATCH 09/48] Update 2023.06.lua Added EPREFIX + EESSI_CPU_FAMILY env vars --- init/modules/EESSI/2023.06.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index c6091c5be6..d39fa20a4b 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -48,6 +48,8 @@ local eessi_eprefix = pathJoin(eessi_prefix, "compat", eessi_os_type, eessi_cpu_ local eessi_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_software_subdir) local eessi_module_path = pathJoin(eessi_software_path, "modules", "all") local eessi_site_module_path = string.gsub(eessi_module_path, "versions", "host_injections") +setenv("EPREFIX", eessi_eprefix) +setenv("EESSI_CPU_FAMILY", eessi_cpu_family) setenv("EESSI_SITE_MODULEPATH", eessi_site_module_path) setenv("EESSI_SOFTWARE_SUBDIR", eessi_software_subdir) setenv("EESSI_PREFIX", eessi_prefix) From b85e37b988ac2e7a9ae67fd2506638b48bd7b2ae Mon Sep 17 00:00:00 2001 From: Richard Top Date: Wed, 14 Aug 2024 11:58:58 +0000 Subject: [PATCH 10/48] Added EESSI/2023.06 to install_scripts.sh --- install_scripts.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install_scripts.sh b/install_scripts.sh index 6f01818840..0cfa5310c2 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -102,6 +102,12 @@ mc_files=( ) copy_files_by_list ${TOPDIR}/init/Magic_Castle ${INSTALL_PREFIX}/init/Magic_Castle "${mc_files[@]}" +# Copy for init/modules/EESSI directory +mc_files=( + 2023.06.lua +) +copy_files_by_list ${TOPDIR}/init/modules/EESSI ${INSTALL_PREFIX}/init/modules/EESSI "${mc_files[@]}" + # Copy for the scripts directory script_files=( utils.sh From aa35e754dec13eadec328752457adaf0b20ac81c Mon Sep 17 00:00:00 2001 From: Richard Top Date: Thu, 15 Aug 2024 12:57:16 +0000 Subject: [PATCH 11/48] Added a draft CI tests for EESSI module --- .github/workflows/tests_eessi_module.yml | 86 ++++++++++++++++++++++++ init/modules/EESSI/2023.06.lua | 2 +- 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/tests_eessi_module.yml diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml new file mode 100644 index 0000000000..ef72ffeb0e --- /dev/null +++ b/.github/workflows/tests_eessi_module.yml @@ -0,0 +1,86 @@ +# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions +name: Check for EESSI module functionality in software.eessi.io +on: + push: + branches: [ "*-software.eessi.io" ] + pull_request: + workflow_dispatch: +permissions: + contents: read # to fetch code (actions/checkout) +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + EESSI_VERSION: + - 2023.06 + EESSI_SOFTWARE_SUBDIR_OVERRIDE: + - aarch64/generic + - aarch64/neoverse_n1 + - aarch64/neoverse_v1 + - x86_64/amd/zen2 + - x86_64/amd/zen3 + - x86_64/intel/haswell + - x86_64/intel/skylake_avx512 + - x86_64/generic + fail-fast: false + steps: + - name: Check out software-layer repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Mount EESSI CernVM-FS pilot repository + uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0 + with: + 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: Test for archdetect_cpu functionality with only one valid path + run: | + export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH + CPU_ARCH=$(./init/eessi_archdetect.sh cpupath) + export EESSI_ARCHDETECT_OPTIONS=dummy/cpu:$CPU_ARCH:dummy1/cpu1 + if module load EESSI/${{matrix.EESSI_VERSION}}; then + if [[ $CPU_ARCH == "${EESSI_SOFTWARE_SUBDIR}" ]]; then + echo "Test for picking up on \$archdetect_cpu PASSED" + else + echo "Test for picking up on \$archdetdect_cpu FAILED" >&2 + exit 1 + fi + module unload EESSI/${{matrix.EESSI_VERSION}} + fi + unset EESSI_ARCHDETECT_OPTIONS + + - name: Test for archdetect_cpu functionality with invalid path + run: | + export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH + export EESSI_ARCHDETECT_OPTIONS=dummy/cpu + outfile=outfile.txt + module load EESSI/${{matrix.EESSI_VERSION}} > $outfile 2>&1 + result=$(grep "Software" $outfile) + if [[ "$result" == *"Software directory check for the detected architecture failed"* ]]; then + echo "Test for picking up invalid path on \$archdetect_cpu PASSED" + else + echo "Test for picking up invalid path on \$archdetect_cpu FAILED" >&2 + exit 1 + fi + rm $outfile + unset EESSI_ARCHDETECT_OPTIONS + + - name: Test for expected variables after loading EESSI module + run: | + export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH + moduleoutfile=moduleout.txt + sourceoutfile=sourceout.txt + module load EESSI/${{matrix.EESSI_VERSION}} + env | grep -E '^(EESSI_S|EESSI_C)' | sort | > ${moduleoutfile} + module unload EESSI/${{matrix.EESSI_VERSION}} + source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash + env | grep -E '^(EESSI_S|EESSI_C)' | sort | > ${sourceoutfile} + if (diff ${moduleoutfile} ${sourceoutfile} > /dev/null); then + echo "Test for checking env variables PASSED" + else + echo "Test for checking env variables FAILED" >&2 + exit 1 + fi + rm $moduleoutfile $sourceoutfile diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index d39fa20a4b..3cccffd2bb 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -43,7 +43,7 @@ function archdetect_cpu() end local archdetect = archdetect_cpu() local eessi_cpu_family = archdetect:match("([^/]+)") -local eessi_software_subdir = os.getenv("EESSI_SOFTWARE_SUBDIR_OVERRIDE") or archdetect +local eessi_software_subdir = archdetect local eessi_eprefix = pathJoin(eessi_prefix, "compat", eessi_os_type, eessi_cpu_family) local eessi_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_software_subdir) local eessi_module_path = pathJoin(eessi_software_path, "modules", "all") From aa2a1d61df8d12b390e74ef30456a5a034f3a4b7 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Thu, 15 Aug 2024 15:29:10 +0200 Subject: [PATCH 12/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index ef72ffeb0e..03d81cc3d6 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -13,16 +13,7 @@ jobs: strategy: matrix: EESSI_VERSION: - - 2023.06 - EESSI_SOFTWARE_SUBDIR_OVERRIDE: - - aarch64/generic - - aarch64/neoverse_n1 - - aarch64/neoverse_v1 - - x86_64/amd/zen2 - - x86_64/amd/zen3 - - x86_64/intel/haswell - - x86_64/intel/skylake_avx512 - - x86_64/generic + - 2023.06 fail-fast: false steps: - name: Check out software-layer repository From 890c38b152d9979cee43006689d5b8b7c206824f Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Thu, 15 Aug 2024 15:43:38 +0200 Subject: [PATCH 13/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 03d81cc3d6..5c467942b6 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -11,10 +11,10 @@ jobs: build: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: EESSI_VERSION: - 2023.06 - fail-fast: false steps: - name: Check out software-layer repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 From 19af8cfe7f6de9c2fb91c254a608d8500829fe0d Mon Sep 17 00:00:00 2001 From: Richard Top Date: Thu, 15 Aug 2024 16:00:14 +0000 Subject: [PATCH 14/48] Added a draft CI tests for EESSI module --- .github/workflows/tests_eessi_module.yml | 118 +++++++++++------------ 1 file changed, 54 insertions(+), 64 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 5c467942b6..028730cded 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -1,12 +1,3 @@ -# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions -name: Check for EESSI module functionality in software.eessi.io -on: - push: - branches: [ "*-software.eessi.io" ] - pull_request: - workflow_dispatch: -permissions: - contents: read # to fetch code (actions/checkout) jobs: build: runs-on: ubuntu-latest @@ -14,64 +5,63 @@ jobs: fail-fast: false matrix: EESSI_VERSION: - - 2023.06 + - 2023.06 steps: - - name: Check out software-layer repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Check out software-layer repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Mount EESSI CernVM-FS pilot repository - uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0 - with: - 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: Mount EESSI CernVM-FS pilot repository + uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0 + with: + 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: Test for archdetect_cpu functionality with only one valid path - run: | - export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH - CPU_ARCH=$(./init/eessi_archdetect.sh cpupath) - export EESSI_ARCHDETECT_OPTIONS=dummy/cpu:$CPU_ARCH:dummy1/cpu1 - if module load EESSI/${{matrix.EESSI_VERSION}}; then - if [[ $CPU_ARCH == "${EESSI_SOFTWARE_SUBDIR}" ]]; then - echo "Test for picking up on \$archdetect_cpu PASSED" - else - echo "Test for picking up on \$archdetdect_cpu FAILED" >&2 - exit 1 - fi - module unload EESSI/${{matrix.EESSI_VERSION}} - fi - unset EESSI_ARCHDETECT_OPTIONS - - - name: Test for archdetect_cpu functionality with invalid path - run: | - export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH - export EESSI_ARCHDETECT_OPTIONS=dummy/cpu - outfile=outfile.txt - module load EESSI/${{matrix.EESSI_VERSION}} > $outfile 2>&1 - result=$(grep "Software" $outfile) - if [[ "$result" == *"Software directory check for the detected architecture failed"* ]]; then - echo "Test for picking up invalid path on \$archdetect_cpu PASSED" + - name: Test for archdetect_cpu functionality with only one valid path + run: | + export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH + CPU_ARCH=$(./init/eessi_archdetect.sh cpupath) + export EESSI_ARCHDETECT_OPTIONS=dummy/cpu:$CPU_ARCH:dummy1/cpu1 + if module load EESSI/${{matrix.EESSI_VERSION}}; then + if [[ $CPU_ARCH == "${EESSI_SOFTWARE_SUBDIR}" ]]; then + echo "Test for picking up on \$archdetect_cpu PASSED" else - echo "Test for picking up invalid path on \$archdetect_cpu FAILED" >&2 - exit 1 + echo "Test for picking up on \$archdetect_cpu FAILED" >&2 + exit 1 fi - rm $outfile - unset EESSI_ARCHDETECT_OPTIONS + module unload EESSI/${{matrix.EESSI_VERSION}} + fi + unset EESSI_ARCHDETECT_OPTIONS - - name: Test for expected variables after loading EESSI module - run: | - export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH - moduleoutfile=moduleout.txt - sourceoutfile=sourceout.txt - module load EESSI/${{matrix.EESSI_VERSION}} - env | grep -E '^(EESSI_S|EESSI_C)' | sort | > ${moduleoutfile} - module unload EESSI/${{matrix.EESSI_VERSION}} - source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash - env | grep -E '^(EESSI_S|EESSI_C)' | sort | > ${sourceoutfile} - if (diff ${moduleoutfile} ${sourceoutfile} > /dev/null); then - echo "Test for checking env variables PASSED" - else - echo "Test for checking env variables FAILED" >&2 - exit 1 - fi - rm $moduleoutfile $sourceoutfile + - name: Test for archdetect_cpu functionality with invalid path + run: | + export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH + export EESSI_ARCHDETECT_OPTIONS=dummy/cpu + outfile=outfile.txt + module load EESSI/${{matrix.EESSI_VERSION}} > $outfile 2>&1 + result=$(grep "Software" $outfile) + if [[ "$result" == *"Software directory check for the detected architecture failed"* ]]; then + echo "Test for picking up invalid path on \$archdetect_cpu PASSED" + else + echo "Test for picking up invalid path on \$archdetect_cpu FAILED" >&2 + exit 1 + fi + unset EESSI_ARCHDETECT_OPTIONS + + - name: Test for expected variables after loading EESSI module + run: | + export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH + moduleoutfile=moduleout.txt + sourceoutfile=sourceout.txt + module load EESSI/${{matrix.EESSI_VERSION}} + env | grep -E '^(EESSI_S|EESSI_C)' | sort | > ${moduleoutfile} + module unload EESSI/${{matrix.EESSI_VERSION}} + source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash + env | grep -E '^(EESSI_S|EESSI_C)' | sort | > ${sourceoutfile} + if (diff ${moduleoutfile} ${sourceoutfile} > /dev/null); then + echo "Test for checking env variables PASSED" + else + echo "Test for checking env variables FAILED" >&2 + exit 1 + fi + From 5cb1f3647d0a11c6c07edeb403946a336fc7e844 Mon Sep 17 00:00:00 2001 From: Richard Top Date: Thu, 15 Aug 2024 16:10:44 +0000 Subject: [PATCH 15/48] Added missing required yml file format --- .github/workflows/tests_eessi_module.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 028730cded..6cec64380a 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -1,3 +1,11 @@ +# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions +name: Tests for eessi_module_functionality in software.eessi.io +on: + push: + branches: [ "*-software.eessi.io" ] + pull_request: +permissions: + contents: read # to fetch code (actions/checkout) jobs: build: runs-on: ubuntu-latest From 8f75d56010281cbe363c016c792c57441c64b869 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:12:56 +0200 Subject: [PATCH 16/48] Update init/modules/EESSI/2023.06.lua MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Thomas Röblitz --- init/modules/EESSI/2023.06.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 3cccffd2bb..20c58218be 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -8,7 +8,7 @@ More information - URL: https://www.eessi.io/docs/ ]]) whatis("Description: The European Environment for Scientific Software Installations (EESSI, pronounced as easy) is a collaboration between different European partners in HPC community. The goal of this project is to build a common stack of scientific software installations for HPC systems and beyond, including laptops, personal workstations and cloud infrastructure.") -whatis("URL: https://www.eessi.io/docs/:") +whatis("URL: https://www.eessi.io/docs/") local eessi_version = myModuleVersion() local eessi_repo = "/cvmfs/software.eessi.io" From 05820184e4046fc3856f35fc4739d47a6361a7aa Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 26 Aug 2024 09:51:51 +0200 Subject: [PATCH 17/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 6cec64380a..b14a04289e 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -30,6 +30,7 @@ jobs: export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH CPU_ARCH=$(./init/eessi_archdetect.sh cpupath) export EESSI_ARCHDETECT_OPTIONS=dummy/cpu:$CPU_ARCH:dummy1/cpu1 + . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash if module load EESSI/${{matrix.EESSI_VERSION}}; then if [[ $CPU_ARCH == "${EESSI_SOFTWARE_SUBDIR}" ]]; then echo "Test for picking up on \$archdetect_cpu PASSED" @@ -42,8 +43,7 @@ jobs: unset EESSI_ARCHDETECT_OPTIONS - name: Test for archdetect_cpu functionality with invalid path - run: | - export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH + run: | export EESSI_ARCHDETECT_OPTIONS=dummy/cpu outfile=outfile.txt module load EESSI/${{matrix.EESSI_VERSION}} > $outfile 2>&1 @@ -57,8 +57,7 @@ jobs: unset EESSI_ARCHDETECT_OPTIONS - name: Test for expected variables after loading EESSI module - run: | - export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH + run: | moduleoutfile=moduleout.txt sourceoutfile=sourceout.txt module load EESSI/${{matrix.EESSI_VERSION}} From a7d7aff8928f1aae1260f0d5f0f291d48e4dc282 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:01:28 +0200 Subject: [PATCH 18/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index b14a04289e..31e790c90a 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -31,7 +31,7 @@ jobs: CPU_ARCH=$(./init/eessi_archdetect.sh cpupath) export EESSI_ARCHDETECT_OPTIONS=dummy/cpu:$CPU_ARCH:dummy1/cpu1 . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash - if module load EESSI/${{matrix.EESSI_VERSION}}; then + if module --ignore_cache load EESSI/${{matrix.EESSI_VERSION}}; then if [[ $CPU_ARCH == "${EESSI_SOFTWARE_SUBDIR}" ]]; then echo "Test for picking up on \$archdetect_cpu PASSED" else From 53bc4a0145aba4e2d064e44fd60546cb9effdb3e Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:42:23 +0200 Subject: [PATCH 19/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 31e790c90a..e668a3f2bc 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -31,6 +31,7 @@ jobs: CPU_ARCH=$(./init/eessi_archdetect.sh cpupath) export EESSI_ARCHDETECT_OPTIONS=dummy/cpu:$CPU_ARCH:dummy1/cpu1 . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash + module avail EESSI if module --ignore_cache load EESSI/${{matrix.EESSI_VERSION}}; then if [[ $CPU_ARCH == "${EESSI_SOFTWARE_SUBDIR}" ]]; then echo "Test for picking up on \$archdetect_cpu PASSED" From f4ee932d23db0ed432f69ca6f5fc77c3191c6504 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 26 Aug 2024 10:46:29 +0200 Subject: [PATCH 20/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index e668a3f2bc..2e3b824ccc 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -27,10 +27,10 @@ jobs: - name: Test for archdetect_cpu functionality with only one valid path run: | - export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules/:$MODULEPATH CPU_ARCH=$(./init/eessi_archdetect.sh cpupath) export EESSI_ARCHDETECT_OPTIONS=dummy/cpu:$CPU_ARCH:dummy1/cpu1 . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash + export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules module avail EESSI if module --ignore_cache load EESSI/${{matrix.EESSI_VERSION}}; then if [[ $CPU_ARCH == "${EESSI_SOFTWARE_SUBDIR}" ]]; then From 51700885e575117521edf426d7eadd528adc79d8 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:13:31 +0200 Subject: [PATCH 21/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 2e3b824ccc..4b0fbe881f 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -31,6 +31,8 @@ jobs: export EESSI_ARCHDETECT_OPTIONS=dummy/cpu:$CPU_ARCH:dummy1/cpu1 . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules + echo $MODULEPATH + env | grep LMOD module avail EESSI if module --ignore_cache load EESSI/${{matrix.EESSI_VERSION}}; then if [[ $CPU_ARCH == "${EESSI_SOFTWARE_SUBDIR}" ]]; then From 3cea84681ad2bb312c7d83aa2df6f8d584f37bea Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:28:47 +0200 Subject: [PATCH 22/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 4b0fbe881f..b6bd865e4c 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -31,7 +31,7 @@ jobs: export EESSI_ARCHDETECT_OPTIONS=dummy/cpu:$CPU_ARCH:dummy1/cpu1 . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules - echo $MODULEPATH + ls $MODULEPATH/EESSI env | grep LMOD module avail EESSI if module --ignore_cache load EESSI/${{matrix.EESSI_VERSION}}; then From 5484b921fc1289bb71cc0a28a9714d0991bca2a3 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:18:10 +0200 Subject: [PATCH 23/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 43 +++++++++--------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index b6bd865e4c..fdbd2fac96 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -25,32 +25,17 @@ jobs: cvmfs_http_proxy: DIRECT cvmfs_repositories: software.eessi.io - - name: Test for archdetect_cpu functionality with only one valid path + - name: Initialise Lmod run: | - CPU_ARCH=$(./init/eessi_archdetect.sh cpupath) - export EESSI_ARCHDETECT_OPTIONS=dummy/cpu:$CPU_ARCH:dummy1/cpu1 + export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash - export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules - ls $MODULEPATH/EESSI - env | grep LMOD - module avail EESSI - if module --ignore_cache load EESSI/${{matrix.EESSI_VERSION}}; then - if [[ $CPU_ARCH == "${EESSI_SOFTWARE_SUBDIR}" ]]; then - echo "Test for picking up on \$archdetect_cpu PASSED" - else - echo "Test for picking up on \$archdetect_cpu FAILED" >&2 - exit 1 - fi - module unload EESSI/${{matrix.EESSI_VERSION}} - fi - unset EESSI_ARCHDETECT_OPTIONS - + - name: Test for archdetect_cpu functionality with invalid path run: | - export EESSI_ARCHDETECT_OPTIONS=dummy/cpu - outfile=outfile.txt - module load EESSI/${{matrix.EESSI_VERSION}} > $outfile 2>&1 - result=$(grep "Software" $outfile) + export EESSI_ARCHDETECT_OPTIONS="dummy/cpu" + outfile="outfile.txt" + module load EESSI/${{matrix.EESSI_VERSION}} > "$outfile" 2>&1 + result=$(grep "Software" "$outfile") if [[ "$result" == *"Software directory check for the detected architecture failed"* ]]; then echo "Test for picking up invalid path on \$archdetect_cpu PASSED" else @@ -60,15 +45,17 @@ jobs: unset EESSI_ARCHDETECT_OPTIONS - name: Test for expected variables after loading EESSI module - run: | - moduleoutfile=moduleout.txt - sourceoutfile=sourceout.txt + run: | + CPU_ARCH=$(./init/eessi_archdetect.sh -a cpupath) + export EESSI_ARCHDETECT_OPTIONS="dummy/cpu:$CPU_ARCH:dummy1/cpu1" + moduleoutfile="moduleout.txt" + sourceoutfile="sourceout.txt" module load EESSI/${{matrix.EESSI_VERSION}} - env | grep -E '^(EESSI_S|EESSI_C)' | sort | > ${moduleoutfile} + env | grep -E '^(EESSI_S|EESSI_C)' | sort | > "$moduleoutfile" module unload EESSI/${{matrix.EESSI_VERSION}} source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash - env | grep -E '^(EESSI_S|EESSI_C)' | sort | > ${sourceoutfile} - if (diff ${moduleoutfile} ${sourceoutfile} > /dev/null); then + env | grep -E '^(EESSI_S|EESSI_C)' | sort | > "$sourceoutfile" + if (diff "$moduleoutfile" "$sourceoutfile" > /dev/null); then echo "Test for checking env variables PASSED" else echo "Test for checking env variables FAILED" >&2 From 63002d5f898f67a008f271ddfd434e71e9cfbeb4 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:47:05 +0200 Subject: [PATCH 24/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index fdbd2fac96..b2294fe171 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -31,31 +31,33 @@ jobs: . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash - name: Test for archdetect_cpu functionality with invalid path - run: | + run: | + set +e # Do not exit immediately if a command exits with a non-zero status export EESSI_ARCHDETECT_OPTIONS="dummy/cpu" outfile="outfile.txt" - module load EESSI/${{matrix.EESSI_VERSION}} > "$outfile" 2>&1 - result=$(grep "Software" "$outfile") - if [[ "$result" == *"Software directory check for the detected architecture failed"* ]]; then - echo "Test for picking up invalid path on \$archdetect_cpu PASSED" + module load EESSI/${{matrix.EESSI_VERSION}} > "${outfile}" 2>&1 + result=$(grep "Software" "${outfile}") + if [[ "${result}" == *"Software directory check for the detected architecture failed"* ]]; then + echo "Test for picking up invalid path on \${archdetect_cpu} PASSED" else - echo "Test for picking up invalid path on \$archdetect_cpu FAILED" >&2 + echo "Test for picking up invalid path on \${archdetect_cpu} FAILED" >&2 exit 1 fi unset EESSI_ARCHDETECT_OPTIONS + set -e # Re-enable exit on non-zero status - - name: Test for expected variables after loading EESSI module + - name: Test for expected variables while adding dummy cpu archs and loading EESSI module run: | CPU_ARCH=$(./init/eessi_archdetect.sh -a cpupath) - export EESSI_ARCHDETECT_OPTIONS="dummy/cpu:$CPU_ARCH:dummy1/cpu1" + export EESSI_ARCHDETECT_OPTIONS="dummy/cpu:${CPU_ARCH}:dummy1/cpu1" moduleoutfile="moduleout.txt" sourceoutfile="sourceout.txt" module load EESSI/${{matrix.EESSI_VERSION}} - env | grep -E '^(EESSI_S|EESSI_C)' | sort | > "$moduleoutfile" + env | grep -E '^(EESSI_S|EESSI_C)' | sort | > "${moduleoutfile}" module unload EESSI/${{matrix.EESSI_VERSION}} source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash - env | grep -E '^(EESSI_S|EESSI_C)' | sort | > "$sourceoutfile" - if (diff "$moduleoutfile" "$sourceoutfile" > /dev/null); then + env | grep -E '^(EESSI_S|EESSI_C)' | sort | > "${sourceoutfile}" + if (diff "${moduleoutfile}" "${sourceoutfile}" > /dev/null); then echo "Test for checking env variables PASSED" else echo "Test for checking env variables FAILED" >&2 From 50782e4324967dd27e4a818704ca1d24fbef24dc Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 27 Aug 2024 08:17:42 +0200 Subject: [PATCH 25/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index b2294fe171..2e521f5809 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -27,9 +27,9 @@ jobs: - name: Initialise Lmod run: | - export MODULEPATH=/cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/modules . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash - + module use init/modules + - name: Test for archdetect_cpu functionality with invalid path run: | set +e # Do not exit immediately if a command exits with a non-zero status From 477476b05a3b6fc23f0112d2eb6aaaf445be5f89 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 27 Aug 2024 08:33:09 +0200 Subject: [PATCH 26/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 2e521f5809..335b8d9a59 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -36,6 +36,7 @@ jobs: export EESSI_ARCHDETECT_OPTIONS="dummy/cpu" outfile="outfile.txt" module load EESSI/${{matrix.EESSI_VERSION}} > "${outfile}" 2>&1 + cat "${outfile}" result=$(grep "Software" "${outfile}") if [[ "${result}" == *"Software directory check for the detected architecture failed"* ]]; then echo "Test for picking up invalid path on \${archdetect_cpu} PASSED" From b651030abaeb072af74843407c5a6fda16f20f9e Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:15:16 +0200 Subject: [PATCH 27/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 335b8d9a59..9b2e8aeab5 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -28,6 +28,7 @@ jobs: - name: Initialise Lmod run: | . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash + module --version module use init/modules - name: Test for archdetect_cpu functionality with invalid path From 543f7601d8dd0c5059a0bc79e18e1104d51afa27 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:19:10 +0200 Subject: [PATCH 28/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 9b2e8aeab5..f3f26208ad 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -25,14 +25,9 @@ jobs: cvmfs_http_proxy: DIRECT cvmfs_repositories: software.eessi.io - - name: Initialise Lmod - run: | - . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash - module --version - module use init/modules - - name: Test for archdetect_cpu functionality with invalid path run: | + . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash # Initialise Lmod set +e # Do not exit immediately if a command exits with a non-zero status export EESSI_ARCHDETECT_OPTIONS="dummy/cpu" outfile="outfile.txt" From 7acc85ed5e147fc6e083cb97dc472ffa51dcf79b Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:25:06 +0200 Subject: [PATCH 29/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index f3f26208ad..8b7911e0c4 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -28,6 +28,7 @@ jobs: - name: Test for archdetect_cpu functionality with invalid path run: | . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash # Initialise Lmod + export MODULEPATH=init/modules set +e # Do not exit immediately if a command exits with a non-zero status export EESSI_ARCHDETECT_OPTIONS="dummy/cpu" outfile="outfile.txt" @@ -45,6 +46,8 @@ jobs: - name: Test for expected variables while adding dummy cpu archs and loading EESSI module run: | + . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash # Initialise Lmod + export MODULEPATH=init/modules CPU_ARCH=$(./init/eessi_archdetect.sh -a cpupath) export EESSI_ARCHDETECT_OPTIONS="dummy/cpu:${CPU_ARCH}:dummy1/cpu1" moduleoutfile="moduleout.txt" From 7791be4c9f3ff14b0c224237f80de30dd67f3a65 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:34:37 +0200 Subject: [PATCH 30/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 8b7911e0c4..3a7c217719 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -34,7 +34,7 @@ jobs: outfile="outfile.txt" module load EESSI/${{matrix.EESSI_VERSION}} > "${outfile}" 2>&1 cat "${outfile}" - result=$(grep "Software" "${outfile}") + result=$(cat "${outfile}") if [[ "${result}" == *"Software directory check for the detected architecture failed"* ]]; then echo "Test for picking up invalid path on \${archdetect_cpu} PASSED" else From 3fab812be5fce883a63bc0bf0aaa6c619dda3a34 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:48:30 +0200 Subject: [PATCH 31/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 3a7c217719..ab7fec4953 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -34,8 +34,7 @@ jobs: outfile="outfile.txt" module load EESSI/${{matrix.EESSI_VERSION}} > "${outfile}" 2>&1 cat "${outfile}" - result=$(cat "${outfile}") - if [[ "${result}" == *"Software directory check for the detected architecture failed"* ]]; then + if grep -q "Software directory check" "${outfile}"; then echo "Test for picking up invalid path on \${archdetect_cpu} PASSED" else echo "Test for picking up invalid path on \${archdetect_cpu} FAILED" >&2 From 623fd67d4d376c0accb3606e522d344bfb1a01a1 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:56:32 +0200 Subject: [PATCH 32/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index ab7fec4953..e40f1e9903 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -56,6 +56,8 @@ jobs: module unload EESSI/${{matrix.EESSI_VERSION}} source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash env | grep -E '^(EESSI_S|EESSI_C)' | sort | > "${sourceoutfile}" + cat "${moduleoutfile}" + cat "${sourceoutfile}" if (diff "${moduleoutfile}" "${sourceoutfile}" > /dev/null); then echo "Test for checking env variables PASSED" else From 2e4d5d6ac8027f3516d3683da0087720f1334c4d Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 27 Aug 2024 10:03:31 +0200 Subject: [PATCH 33/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index e40f1e9903..8a26638438 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -52,10 +52,10 @@ jobs: moduleoutfile="moduleout.txt" sourceoutfile="sourceout.txt" module load EESSI/${{matrix.EESSI_VERSION}} - env | grep -E '^(EESSI_S|EESSI_C)' | sort | > "${moduleoutfile}" + env | grep -E '^(EESSI_S|EESSI_C)' | sort > "${moduleoutfile}" module unload EESSI/${{matrix.EESSI_VERSION}} source /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/init/bash - env | grep -E '^(EESSI_S|EESSI_C)' | sort | > "${sourceoutfile}" + env | grep -E '^(EESSI_S|EESSI_C)' | sort > "${sourceoutfile}" cat "${moduleoutfile}" cat "${sourceoutfile}" if (diff "${moduleoutfile}" "${sourceoutfile}" > /dev/null); then From 090133cb7f7c998bb2e8f1160638691f9a511b5a Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 27 Aug 2024 14:26:50 +0200 Subject: [PATCH 34/48] Update install_scripts.sh --- install_scripts.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install_scripts.sh b/install_scripts.sh index 0cfa5310c2..d880679fbc 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -106,7 +106,11 @@ copy_files_by_list ${TOPDIR}/init/Magic_Castle ${INSTALL_PREFIX}/init/Magic_Cast mc_files=( 2023.06.lua ) -copy_files_by_list ${TOPDIR}/init/modules/EESSI ${INSTALL_PREFIX}/init/modules/EESSI "${mc_files[@]}" +if [ -n "$EESSI_CVMFS_REPO" ]; then + copy_files_by_list ${TOPDIR}/init/modules/EESSI ${EESSI_CVMFS_REPO}/modules/EESSI "${mc_files[@]}" +else + echo "Error: EESSI_CVMFS_REPO is required for copying the module files." >&2 +fi # Copy for the scripts directory script_files=( From 8cea03bb7a149da2a86066d0f31f453f41cf6933 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:29:38 +0200 Subject: [PATCH 35/48] Update 2023.06.lua --- init/modules/EESSI/2023.06.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 20c58218be..915756173e 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -9,7 +9,7 @@ More information ]]) whatis("Description: The European Environment for Scientific Software Installations (EESSI, pronounced as easy) is a collaboration between different European partners in HPC community. The goal of this project is to build a common stack of scientific software installations for HPC systems and beyond, including laptops, personal workstations and cloud infrastructure.") whatis("URL: https://www.eessi.io/docs/") - +conflict("EESSI") local eessi_version = myModuleVersion() local eessi_repo = "/cvmfs/software.eessi.io" local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) From a5d78121ed056166267dfab8b1890026102f66f5 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:34:05 +0200 Subject: [PATCH 36/48] Update install_scripts.sh --- install_scripts.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/install_scripts.sh b/install_scripts.sh index d880679fbc..0cfa5310c2 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -106,11 +106,7 @@ copy_files_by_list ${TOPDIR}/init/Magic_Castle ${INSTALL_PREFIX}/init/Magic_Cast mc_files=( 2023.06.lua ) -if [ -n "$EESSI_CVMFS_REPO" ]; then - copy_files_by_list ${TOPDIR}/init/modules/EESSI ${EESSI_CVMFS_REPO}/modules/EESSI "${mc_files[@]}" -else - echo "Error: EESSI_CVMFS_REPO is required for copying the module files." >&2 -fi +copy_files_by_list ${TOPDIR}/init/modules/EESSI ${INSTALL_PREFIX}/init/modules/EESSI "${mc_files[@]}" # Copy for the scripts directory script_files=( From 6a1d61526653eb91a39654316f9133fe29092ae5 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:41:34 +0200 Subject: [PATCH 37/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 8a26638438..9149f336c2 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -24,7 +24,18 @@ 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: Test for making sure spider cache is being used and not being rebuilt + run: | + . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash # Initialise Lmod + export MODULEPATH=init/modules + if timeout 10s bash -c "LMOD_PAGER=none module --terse avail"; then + echo "EESSI spider cache is being used" + else + echo "EESSI spider cache is being rebuilt" >&2 + exit 1 + fi + - name: Test for archdetect_cpu functionality with invalid path run: | . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash # Initialise Lmod From 69a7e660b47de43e544aa1600c9e76caa3830f28 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:57:27 +0200 Subject: [PATCH 38/48] Update .github/workflows/tests_eessi_module.yml Co-authored-by: ocaisa --- .github/workflows/tests_eessi_module.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 9149f336c2..4f261b85d1 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -29,6 +29,7 @@ jobs: run: | . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash # Initialise Lmod export MODULEPATH=init/modules + module load EESSI/${{matrix.EESSI_VERSION}} if timeout 10s bash -c "LMOD_PAGER=none module --terse avail"; then echo "EESSI spider cache is being used" else From c7dce8cff91f8e97eb7241bc11ebf5f19a1639c4 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:57:39 +0200 Subject: [PATCH 39/48] Update .github/workflows/tests_eessi_module.yml Co-authored-by: ocaisa --- .github/workflows/tests_eessi_module.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 4f261b85d1..9d668e1aec 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -36,6 +36,8 @@ jobs: echo "EESSI spider cache is being rebuilt" >&2 exit 1 fi + module purge + unset MODULEPATH - name: Test for archdetect_cpu functionality with invalid path run: | From cc3b877c6432e322e9e0b35868a48f98a6ca93e1 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:54:50 +0200 Subject: [PATCH 40/48] Update 2023.06.lua --- init/modules/EESSI/2023.06.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 915756173e..7770fe756c 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -58,8 +58,10 @@ prepend_path("PATH", pathJoin(eessi_eprefix, "bin")) prepend_path("PATH", pathJoin(eessi_eprefix, "usr/bin")) setenv("EESSI_SOFTWARE_PATH", eessi_software_path) setenv("EESSI_MODULEPATH", eessi_module_path) -prepend_path("MODULEPATH", eessi_module_path) -prepend_path("MODULEPATH", eessi_site_module_path) +if ( mode() ~= "spider" ) then + prepend_path("MODULEPATH", eessi_module_path) + prepend_path("MODULEPATH", eessi_site_module_path) +end setenv("LMOD_CONFIG_DIR", pathJoin(eessi_software_path, ".lmod")) setenv("LMOD_PACKAGE_PATH", pathJoin(eessi_software_path, ".lmod")) if mode() == "load" then From fc64dcf829f29a496f06805942119aa47882fde1 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:56:09 +0200 Subject: [PATCH 41/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 9d668e1aec..27896b9b50 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -36,6 +36,7 @@ jobs: echo "EESSI spider cache is being rebuilt" >&2 exit 1 fi + env | grep LMOD module purge unset MODULEPATH From c8141a91a11c827c1809089902a49d048e58b7f6 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Fri, 30 Aug 2024 18:16:21 +0200 Subject: [PATCH 42/48] Update 2023.06.lua --- init/modules/EESSI/2023.06.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 7770fe756c..61a35d20a1 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -62,7 +62,7 @@ if ( mode() ~= "spider" ) then prepend_path("MODULEPATH", eessi_module_path) prepend_path("MODULEPATH", eessi_site_module_path) end -setenv("LMOD_CONFIG_DIR", pathJoin(eessi_software_path, ".lmod")) +prepend_path("LMOD_RC", pathJoin(eessi_software_path, "/.lmod/lmodrc.lua")) setenv("LMOD_PACKAGE_PATH", pathJoin(eessi_software_path, ".lmod")) if mode() == "load" then LmodMessage("EESSI/" .. eessi_version .. " loaded successfully") From e688d65e73e79f15f7bd33ca5da98909c8891b52 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:05:39 +0200 Subject: [PATCH 43/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 27896b9b50..f0f7fa09a3 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -29,8 +29,11 @@ jobs: run: | . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash # Initialise Lmod export MODULEPATH=init/modules + configfile="configfile.txt" module load EESSI/${{matrix.EESSI_VERSION}} - if timeout 10s bash -c "LMOD_PAGER=none module --terse avail"; then + module --config > "${configfile.txt}" 2>&1 + grep cache "${configfile}" | grep software | grep -v compat + if timeout 10s bash -c "LMOD_PAGER=none module --terse avail" && grep cache "${configfile}" | grep software | grep -v compat; then echo "EESSI spider cache is being used" else echo "EESSI spider cache is being rebuilt" >&2 From 17b512d7e7223f58e5cba054898ee31bf1c88d72 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:08:30 +0200 Subject: [PATCH 44/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index f0f7fa09a3..caf2715f93 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -31,7 +31,7 @@ jobs: export MODULEPATH=init/modules configfile="configfile.txt" module load EESSI/${{matrix.EESSI_VERSION}} - module --config > "${configfile.txt}" 2>&1 + module --config > "${configfile}" 2>&1 grep cache "${configfile}" | grep software | grep -v compat if timeout 10s bash -c "LMOD_PAGER=none module --terse avail" && grep cache "${configfile}" | grep software | grep -v compat; then echo "EESSI spider cache is being used" From de91ea392529a225f0ebb69aff7d8a2a4ce4ff90 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 2 Sep 2024 08:16:26 +0200 Subject: [PATCH 45/48] Update 2023.06.lua To prevent error bad argument #1 to 'gmatch' when module show is used and EESSI_ARCHDETECT_OPTIONS is not set --- init/modules/EESSI/2023.06.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 61a35d20a1..9ad85f42d8 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -25,7 +25,8 @@ function archdetect_cpu() end source_sh("bash", script) end - for archdetect_filter_cpu in string.gmatch(os.getenv("EESSI_ARCHDETECT_OPTIONS"), "([^" .. ":" .. "]+)") do +local archdetect_options = os.getenv("EESSI_ARCHDETECT_OPTIONS") or "" + for archdetect_filter_cpu in string.gmatch(archdetect_options, "([^" .. ":" .. "]+)") do if isDir(pathJoin(eessi_prefix, "software", eessi_os_type, archdetect_filter_cpu, "software")) then -- use x86_64/amd/zen3 for now when AMD Genoa (Zen4) CPU is detected, -- since optimized software installations for Zen4 are a work-in-progress, From dff4b1313d85d7045c85dd6d0f9b305e711e8e91 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Mon, 2 Sep 2024 18:43:12 +0200 Subject: [PATCH 46/48] Update tests_eessi_module.yml --- .github/workflows/tests_eessi_module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index caf2715f93..d2e3cd1338 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -30,7 +30,7 @@ jobs: . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash # Initialise Lmod export MODULEPATH=init/modules configfile="configfile.txt" - module load EESSI/${{matrix.EESSI_VERSION}} + module -T load EESSI/${{matrix.EESSI_VERSION}} module --config > "${configfile}" 2>&1 grep cache "${configfile}" | grep software | grep -v compat if timeout 10s bash -c "LMOD_PAGER=none module --terse avail" && grep cache "${configfile}" | grep software | grep -v compat; then From 0a615423859d35955ca3e7e1125d20ad7cb6da56 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 3 Sep 2024 08:04:56 +0200 Subject: [PATCH 47/48] Update init/modules/EESSI/2023.06.lua Co-authored-by: ocaisa --- init/modules/EESSI/2023.06.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 9ad85f42d8..ddc0fef561 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -25,7 +25,7 @@ function archdetect_cpu() end source_sh("bash", script) end -local archdetect_options = os.getenv("EESSI_ARCHDETECT_OPTIONS") or "" + local archdetect_options = os.getenv("EESSI_ARCHDETECT_OPTIONS") or "" for archdetect_filter_cpu in string.gmatch(archdetect_options, "([^" .. ":" .. "]+)") do if isDir(pathJoin(eessi_prefix, "software", eessi_os_type, archdetect_filter_cpu, "software")) then -- use x86_64/amd/zen3 for now when AMD Genoa (Zen4) CPU is detected, From 47959c5df773bb9e57240a527e92d16612f20275 Mon Sep 17 00:00:00 2001 From: TopRichard <121792457+TopRichard@users.noreply.github.com> Date: Tue, 3 Sep 2024 10:28:57 +0200 Subject: [PATCH 48/48] Update 2023.06.lua --- init/modules/EESSI/2023.06.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index ddc0fef561..32aaf6c07f 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -61,9 +61,9 @@ setenv("EESSI_SOFTWARE_PATH", eessi_software_path) setenv("EESSI_MODULEPATH", eessi_module_path) if ( mode() ~= "spider" ) then prepend_path("MODULEPATH", eessi_module_path) - prepend_path("MODULEPATH", eessi_site_module_path) end prepend_path("LMOD_RC", pathJoin(eessi_software_path, "/.lmod/lmodrc.lua")) +prepend_path("MODULEPATH", eessi_site_module_path) setenv("LMOD_PACKAGE_PATH", pathJoin(eessi_software_path, ".lmod")) if mode() == "load" then LmodMessage("EESSI/" .. eessi_version .. " loaded successfully")