Skip to content

Commit cec3627

Browse files
committed
Merge branch 'init_scripts_fix_version' into EESSI_2025.06_module
2 parents 8355def + caa273a commit cec3627

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

eb_hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def parse_hook_zen4_module_only(ec, eprefix):
408408
# Need to escape newline character so that the newline character actually ends up in the module file
409409
# (otherwise, it splits the string, and a 2-line string ends up in the modulefile, resulting in syntax error)
410410
errmsg = "EasyConfigs using toolchains based on GCCcore-12.2.0 are not supported for the Zen4 architecture.\\n"
411-
errmsg += "See https://www.eessi.io/docs/known_issues/eessi-2023.06/#gcc-1220-and-foss-2022b-based-modules-cannot-be-loaded-on-zen4-architecture"
411+
errmsg += "See https://www.eessi.io/docs/known_issues/eessi-<EESSI_VERSION>/#gcc-1220-and-foss-2022b-based-modules-cannot-be-loaded-on-zen4-architecture"
412412
ec['modluafooter'] = 'if (not os.getenv("%s")) then LmodError("%s") end' % (env_varname, errmsg)
413413

414414

init/eessi_defaults

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# license: GPLv2
99
#
1010

11+
export EESSI_VERSION_DEFAULT='__EESSI_VERSION_DEFAULT__'
12+
1113
# use different defaults for RISC-V, as we want to redirect to the riscv.eessi.io repo
1214
if [[ $(uname -m) == "riscv64" ]]; then
1315
export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/riscv.eessi.io}"
@@ -20,7 +22,7 @@ if [[ $(uname -m) == "riscv64" ]]; then
2022
fi
2123
else
2224
export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/software.eessi.io}"
23-
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=2023.06}"
25+
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=${EESSI_VERSION_DEFAULT}}"
2426
fi
2527
# use archdetect by default, unless otherwise specified
2628
export EESSI_USE_ARCHDETECT="${EESSI_USE_ARCHDETECT:=1}"

init/lmod/zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Choose an EESSI CVMFS repository
22
EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}"
33
# Choose an EESSI version
4-
EESSI_VERSION="${EESSI_VERSION:-2023.06}"
4+
EESSI_VERSION="${EESSI_VERSION:-__EESSI_VERSION_DEFAULT__}"
55
# Path to top-level module tree
66
export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules"
77
. "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/zsh"

init/modules/EESSI/2023.06.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,18 @@ local archdetect_accel = archdetect_accel()
8181
-- eessi_cpu_family is derived from the archdetect match, e.g., x86_64
8282
local eessi_cpu_family = archdetect:match("([^/]+)")
8383
local eessi_software_subdir = archdetect
84-
-- eessi_eprefix is the base location of the compat layer, e.g., /cvmfs/software.eessi.io/versions/2023.06/compat/linux/x86_64
84+
-- eessi_eprefix is the base location of the compat layer, e.g., /cvmfs/software.eessi.io/versions/<EESSI_VERSION>/compat/linux/x86_64
8585
local eessi_eprefix = pathJoin(eessi_prefix, "compat", eessi_os_type, eessi_cpu_family)
8686
-- eessi_software_path is the location of the software installations, e.g.,
87-
-- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3
87+
-- /cvmfs/software.eessi.io/versions/<EESSI_VERSION>/software/linux/x86_64/amd/zen3
8888
local eessi_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_software_subdir)
8989
local eessi_modules_subdir = pathJoin("modules", "all")
9090
-- eessi_module_path is the location of the _CPU_ module files, e.g.,
91-
-- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3/modules/all
91+
-- /cvmfs/software.eessi.io/versions/<EESSI_VERSION>/software/linux/x86_64/amd/zen3/modules/all
9292
local eessi_module_path = pathJoin(eessi_software_path, eessi_modules_subdir)
9393
local eessi_site_software_path = string.gsub(eessi_software_path, "versions", "host_injections")
9494
-- Site module path is the same as the EESSI one, but with `versions` changed to `host_injections`, e.g.,
95-
-- /cvmfs/software.eessi.io/host_injections/2023.06/software/linux/x86_64/amd/zen3/modules/all
95+
-- /cvmfs/software.eessi.io/host_injections/<EESSI_VERSION>/software/linux/x86_64/amd/zen3/modules/all
9696
local eessi_site_module_path = pathJoin(eessi_site_software_path, eessi_modules_subdir)
9797
setenv("EPREFIX", eessi_eprefix)
9898
eessiDebug("Setting EPREFIX to " .. eessi_eprefix)
@@ -135,10 +135,10 @@ if not (archdetect_accel == nil or archdetect_accel == '') then
135135
-- The CPU subdirectory of the accelerator installations is _usually_ the same as host CPU, but this can be overridden
136136
eessi_accel_software_subdir = os.getenv("EESSI_ACCEL_SOFTWARE_SUBDIR_OVERRIDE") or eessi_software_subdir
137137
-- CPU location of the accelerator installations, e.g.,
138-
-- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3
138+
-- /cvmfs/software.eessi.io/versions/<EESSI_VERSION>/software/linux/x86_64/amd/zen3
139139
eessi_accel_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_accel_software_subdir)
140140
-- location of the accelerator modules, e.g.,
141-
-- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3/accel/nvidia/cc80/modules/all
141+
-- /cvmfs/software.eessi.io/versions/<EESSI_VERSION>/software/linux/x86_64/amd/zen3/accel/nvidia/cc80/modules/all
142142
eessi_module_path_accel = pathJoin(eessi_accel_software_path, archdetect_accel, eessi_modules_subdir)
143143
eessiDebug("Checking if " .. eessi_module_path_accel .. " exists")
144144
if isDir(eessi_module_path_accel) then

install_scripts.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,18 @@ hook_files=(
201201
eb_hooks.py
202202
)
203203
copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${hook_files[@]}"
204+
205+
206+
# make sure that scripts in init/ and scripts/ use correct EESSI version
207+
sed -i "s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION}/g" ${INSTALL_PREFIX}/init/eessi_defaults
208+
209+
# replace placeholder for default EESSI version in Lmod init scripts
210+
for shell in $(ls ${INSTALL_PREFIX}/init/lmod); do
211+
sed -i "s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION}/g" ${INSTALL_PREFIX}/init/lmod/${shell}
212+
done
213+
214+
# replace EESSI version used in comments in EESSI module
215+
sed -i "s@/<EESSI_VERSION>/@/${EESSI_VERSION}/@g" ${INSTALL_PREFIX}/init/modules/EESSI/${EESSI_VERSION}.lua
216+
217+
# replace EESSI version used in EasyBuild hooks
218+
sed -i "s@/<EESSI_VERSION>/@/${EESSI_VERSION}/@g" ${INSTALL_PREFIX}/init/easybuild/eb_hooks.py

0 commit comments

Comments
 (0)