From 992f790450953cf4196a74e048970f6bdd366c4f Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Wed, 6 May 2026 15:11:45 +0200 Subject: [PATCH 1/2] Facilitate checking of e.g. RISCV modules on an X86_64 host. This is useful for e.g. running the test suite on an x86_64-based login node, when targetting RISCV-based batch nodes. The reason is that the test suite generates tests based on the available modules, so on the login node (where the reframe runtime runs), we want to see the RISCV modules. This changes allows that when someone does 'EESSI_CPU_FAMILY_OVERRIDE=x86_64 EESSI_VERSION_OVERRIDE=2025.06-001 EESSI_SOFTWARE_SUBDIR_OVERRIDE=riscv64/generic module load EESSI/2025.06' --- init/modules/EESSI/2023.06.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index fca0d69c..51bf33ef 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -19,7 +19,11 @@ local eessi_init_prefix = pathJoin(eessi_prefix, "init") local eessi_software_layer_version_suffix = "" local eessi_os_type = "linux" -- for RISC-V clients we need to do some overrides, as things are stored in different CVMFS repositories -if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then +local eessi_software_subdir_override = os.getenv("EESSI_SOFTWARE_SUBDIR_OVERRIDE") +if ( + subprocess("uname -m"):gsub("\n$","") == "riscv64" + or (eessi_software_subdir_override and string.find(eessi_software_subdir_override, "riscv64")) + ) then if (eessi_version == "2023.06" or eessi_version == "20240402") then eessi_version_override = os.getenv("EESSI_VERSION_OVERRIDE") or "" index_suffix = string.find(eessi_version_override, '-') @@ -114,7 +118,12 @@ local archdetect = archdetect_cpu() -- archdetect_accel() attempts to identify an accelerator, e.g., accel/nvidia/cc80 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_cpu_family +if os.getenv("EESSI_CPU_FAMILY_OVERRIDE") then + eessi_cpu_family = os.getenv("EESSI_CPU_FAMILY_OVERRIDE") +else + eessi_cpu_family = archdetect:match("([^/]+)") +end local eessi_software_subdir = archdetect -- 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_compat_prefix, eessi_os_type, eessi_cpu_family) From 767b81da2c7c291d528bffd2f40b1e8e6f0bf046 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Thu, 7 May 2026 16:47:10 +0200 Subject: [PATCH 2/2] First attempt at adding CI for this functionality --- .github/workflows/tests_eessi_module.yml | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/tests_eessi_module.yml b/.github/workflows/tests_eessi_module.yml index 65ca858b..d4378b66 100644 --- a/.github/workflows/tests_eessi_module.yml +++ b/.github/workflows/tests_eessi_module.yml @@ -316,6 +316,45 @@ jobs: 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}" + check_cpu_family_override: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + EESSI_VERSION: + - '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,dev.eessi.io + + - name: Test if we can override the CPU family to check aarch64 modules on an x86 system + run: | + # Initialise Lmod + . /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash + + # Unload EESSI + module purge + + # Set the overrides we want to test + export EESSI_CPU_FAMILY_OVERRIDE=x86_64 # Running on an x86_64 system, so we need x86_64 compat layer + export EESSI_SOFTWARE_SUBDIR_OVERRIDE=riscv64/generic # Get modules for riscv64/generic + export EESSI_VERSION_OVERRIDE=2025.06-001 # Override EESSI version, as versioning for riscv repo is different + + # Check that we have a riscv MODULEPATH + if [[ "$MODULEPATH" == *"riscv"* ]]; then + echo "MODULEPATH contains riscv prefix ($MODULEPATH)" + else + exit 1 + fi + check_PS1_update_eessi_module: runs-on: ubuntu-24.04 strategy: