From aa4b48478d429cf1d7e589a6d66f12cdd7e3cc98 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sat, 4 May 2024 22:12:38 +0200 Subject: [PATCH 1/2] {2023.06}[foss/2023b] GDB v13.2 --- .../pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023b.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023b.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023b.yml index a161619a32..12564d9cb9 100644 --- a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023b.yml +++ b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023b.yml @@ -22,3 +22,4 @@ easyconfigs: - GROMACS-2024.1-foss-2023b.eb: options: from-pr: 20439 + - GDB-13.2-GCCcore-13.2.0.eb From 47def4e54e43c9717a8ff22bff8b48e759ab71c0 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 5 May 2024 10:44:27 +0200 Subject: [PATCH 2/2] add possibility to ignore certain hooks --- create_lmodsitepackage.py | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/create_lmodsitepackage.py b/create_lmodsitepackage.py index 036e2a92d3..28605beea5 100755 --- a/create_lmodsitepackage.py +++ b/create_lmodsitepackage.py @@ -20,6 +20,27 @@ return content end +local function from_eessi_prefix(t) + -- eessi_prefix is the prefix with official EESSI modules + -- e.g. /cvmfs/software.eessi.io/versions/2023.06 + local eessi_prefix = os.getenv("EESSI_PREFIX") + + -- If EESSI_PREFIX wasn't defined, we cannot check if this module was from the EESSI environment + -- In that case, we assume it isn't, otherwise EESSI_PREFIX would (probably) have been set + if eessi_prefix == nil then + return False + else + -- NOTE: exact paths for site so may need to be updated later. + -- See https://github.com/EESSI/software-layer/pull/371 + -- eessi_prefix_host_injections is the prefix with site-extensions (i.e. additional modules) + -- to the official EESSI modules, e.g. /cvmfs/software.eessi.io/host_injections/2023.06 + local eessi_prefix_host_injections = string.gsub(eessi_prefix, 'versions', 'host_injections') + + -- Check if the full modulepath starts with the eessi_prefix_* + return string.find(t.fn, "^" .. eessi_prefix) ~= nil or string.find(t.fn, "^" .. eessi_prefix_host_injections) ~= nil + end +end + local function load_site_specific_hooks() -- This function will be run after the EESSI hooks are registered -- It will load a local SitePackage.lua that is architecture independent (if it exists) from e.g. @@ -153,10 +174,13 @@ -- Combine both functions into a single one, as we can only register one function as load hook in lmod -- Also: make it non-local, so it can be imported and extended by other lmodrc files if needed function eessi_load_hook(t) - eessi_cuda_enabled_load_hook(t) + -- Only apply CUDA hooks if the loaded module is in the EESSI prefix + -- This avoids getting an Lmod Error when trying to load a CUDA module from a local software stack + if from_eessi_prefix(t) then + eessi_cuda_enabled_load_hook(t) + end end - hook.register("load", eessi_load_hook) -- Note that this needs to happen at the end, so that any EESSI specific hooks can be overwritten by the site