Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 40 additions & 3 deletions .github/workflows/tests_eessi_module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Check out software-layer repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Mount EESSI CernVM-FS pilot repository
- name: Mount EESSI CernVM-FS 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
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Check out software-layer repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Mount EESSI CernVM-FS pilot repository
- name: Mount EESSI CernVM-FS 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
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
- name: Check out software-layer repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Mount EESSI CernVM-FS pilot repository
- name: Mount EESSI CernVM-FS 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
Expand Down Expand Up @@ -232,3 +232,40 @@ jobs:
# (script uses EESSI_SOFTWARE_SUBDIR_OVERRIDE and EESSI_ACCELERATOR_TARGET_OVERRIDE
# as the starting point for the comparison)
python .github/workflows/scripts/verify_eessi_environment.py

check_sticky_eessi_module:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
EESSI_VERSION:
- '2023.06'
- '2025.06'

steps:
- name: Check out software-layer repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Mount EESSI CernVM-FS 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: Make sure we have a sticky EESSI module
run: |
# Initialise Lmod
. /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash

# Make sure we using the module file from the repository
export MODULEPATH=init/modules

# Set the relevant environment variable and load the EESSI module
export EESSI_MODULE_STICKY=1
module load "EESSI/${{matrix.EESSI_VERSION}}"
module list |& grep "EESSI/${{matrix.EESSI_VERSION}}"

# Purge and check the module is still loaded
module purge
module list |& grep "EESSI/${{matrix.EESSI_VERSION}}"
10 changes: 9 additions & 1 deletion init/modules/EESSI/2023.06.lua
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ if isDir(eessi_module_path_accel) then
prepend_path("MODULEPATH", eessi_module_path_site_accel)
eessiDebug("Using site accelerator modules at: " .. eessi_module_path_site_accel)
end

-- allow sites to make the EESSI module sticky by defining EESSI_MODULE_STICKY (to any value)
load_message = "Module for EESSI/" .. eessi_version .. " loaded successfully"
if os.getenv("EESSI_MODULE_STICKY") then
add_property("lmod","sticky")
load_message = load_message .. " (requires '--force' option to unload or purge)"
end

if mode() == "load" then
LmodMessage("EESSI/" .. eessi_version .. " loaded successfully")
LmodMessage(load_message)
end