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
45 changes: 44 additions & 1 deletion .github/workflows/tests_eessi_module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ jobs:
# 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
# Make sure we are using the module file from the repository
export MODULEPATH=init/modules

# Set the relevant environment variable and load the EESSI module
Expand All @@ -269,3 +269,46 @@ jobs:
# Purge and check the module is still loaded
module purge
module list |& grep "EESSI/${{matrix.EESSI_VERSION}}"

check_family_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 can use the family directive in the EESSI module
run: |
# Initialise Lmod
. /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash

# Add a test modulefile for a dummy stack with a "software_stack" family directive
FAMILY=software_stack
TMP_MODULEFILES=$(mktemp -d)
LOCAL_STACK_NAME="local_stack"
LOCAL_STACK_VERSION="${{matrix.EESSI_VERSION}}"
mkdir -p "${TMP_MODULEFILES}/${LOCAL_STACK_NAME}"
echo "family(\"${FAMILY}\")" > "${TMP_MODULEFILES}/${LOCAL_STACK_NAME}/${LOCAL_STACK_VERSION}.lua"

# Make sure we are using the EESSI module file from the repository and the temporary one for the dummy local stack
export MODULEPATH=init/modules:${TMP_MODULEFILES}

# Set the relevant environment variable, load the EESSI module and the local stack module, and grep for
# Lmod is automatically replacing "..." with "...".
export EESSI_MODULE_FAMILY_NAME=${FAMILY}
module load "EESSI/${{matrix.EESSI_VERSION}}"
GREP_PATTERN="Lmod is automatically replacing \"EESSI/${{matrix.EESSI_VERSION}}\" with \"${LOCAL_STACK_NAME}/${LOCAL_STACK_VERSION}\"."
module load "${LOCAL_STACK_NAME}/${LOCAL_STACK_VERSION}" |& grep "${GREP_PATTERN}"
7 changes: 7 additions & 0 deletions init/modules/EESSI/2023.06.lua
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ if isDir(eessi_module_path_accel) then
eessiDebug("Using site accelerator modules at: " .. eessi_module_path_site_accel)
end

-- allow sites to add a family directive to the EESSI module,
-- e.g. for preventing that users load two different/incompatible stacks at the same time
family_name = os.getenv("EESSI_MODULE_FAMILY_NAME")
if family_name then
family(family_name)
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
Expand Down
Loading