Skip to content

Commit f488c6e

Browse files
committed
Allow end users to configure EESSI module to be sticky
1 parent 793cb2f commit f488c6e

File tree

2 files changed

+42
-4
lines changed

2 files changed

+42
-4
lines changed

.github/workflows/tests_eessi_module.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Check out software-layer repository
1919
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2020

21-
- name: Mount EESSI CernVM-FS pilot repository
21+
- name: Mount EESSI CernVM-FS repository
2222
uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0
2323
with:
2424
cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
@@ -81,7 +81,7 @@ jobs:
8181
- name: Check out software-layer repository
8282
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
8383

84-
- name: Mount EESSI CernVM-FS pilot repository
84+
- name: Mount EESSI CernVM-FS repository
8585
uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0
8686
with:
8787
cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
@@ -173,7 +173,7 @@ jobs:
173173
- name: Check out software-layer repository
174174
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
175175

176-
- name: Mount EESSI CernVM-FS pilot repository
176+
- name: Mount EESSI CernVM-FS repository
177177
uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0
178178
with:
179179
cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
@@ -232,3 +232,33 @@ jobs:
232232
# (script uses EESSI_SOFTWARE_SUBDIR_OVERRIDE and EESSI_ACCELERATOR_TARGET_OVERRIDE
233233
# as the starting point for the comparison)
234234
python .github/workflows/scripts/verify_eessi_environment.py
235+
236+
check_sticky_eessi_module:
237+
runs-on: ubuntu-24.04
238+
strategy:
239+
fail-fast: false
240+
matrix:
241+
EESSI_VERSION:
242+
- '2023.06'
243+
- '2025.06'
244+
245+
steps:
246+
- name: Check out software-layer repository
247+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
248+
249+
- name: Mount EESSI CernVM-FS repository
250+
uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0
251+
with:
252+
cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
253+
cvmfs_http_proxy: DIRECT
254+
cvmfs_repositories: software.eessi.io
255+
256+
- name: Make sure we have a sticky EESSI module
257+
run: |
258+
# Set the relevant environment variable and load the EESSI module via Lmod initialisation
259+
export EESSI_MODULE_STICKY=1
260+
. /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash
261+
262+
# Purge the environment and check if EESSI is still loaded
263+
module purge
264+
module list |& grep "EESSI/${{matrix.EESSI_VERSION}}"

init/modules/EESSI/2023.06.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@ if isDir(eessi_module_path_accel) then
172172
prepend_path("MODULEPATH", eessi_module_path_site_accel)
173173
eessiDebug("Using site accelerator modules at: " .. eessi_module_path_site_accel)
174174
end
175+
176+
-- allow sites to make the EESSI module sticky by defining EESSI_MODULE_STICKY (to any value)
177+
load_message = "Module for EESSI/" .. eessi_version .. " loaded successfully"
178+
if os.getenv("EESSI_MODULE_STICKY") then
179+
add_property("lmod","sticky")
180+
load_message += " (requires '--force' option to unload or purge)"
181+
end
182+
175183
if mode() == "load" then
176-
LmodMessage("EESSI/" .. eessi_version .. " loaded successfully")
184+
LmodMessage(load_message)
177185
end

0 commit comments

Comments
 (0)