Skip to content

Commit 71ba332

Browse files
committed
Merge branch 'main' of github.com:EESSI/software-layer-scripts into remove_gromacs_sve_workaround
2 parents e219d0b + 710b8fd commit 71ba332

File tree

6 files changed

+38
-9
lines changed

6 files changed

+38
-9
lines changed

EESSI-extend-easybuild.eb

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,24 @@ sysroot = os.getenv("EESSI_EPREFIX")
9696
-- Check if we have GPU capabilities and configure CUDA compute capabilities
9797
eessi_accelerator_target = os.getenv("EESSI_ACCELERATOR_TARGET")
9898
if (eessi_accelerator_target ~= nil) then
99-
cuda_compute_capability = string.match(eessi_accelerator_target, "^accel/nvidia/cc([0-9][0-9])$")
99+
cuda_compute_capability = string.match(eessi_accelerator_target, "^accel/nvidia/cc([0-9]+)$")
100100
if (cuda_compute_capability ~= nil) then
101-
easybuild_cuda_compute_capabilities = cuda_compute_capability:sub(1, 1) .. "." .. cuda_compute_capability:sub(2, 2)
101+
-- The last digit should be the minor version, insert a dot in the one-but-last position
102+
major_version = cuda_compute_capability:sub(1, #cuda_compute_capability - 1)
103+
minor_version = cuda_compute_capability:sub(#cuda_compute_capability)
104+
easybuild_cuda_compute_capabilities = string.format("%s.%s", major_version, minor_version)
102105
else
103106
LmodError("Incorrect value for $EESSI_ACCELERATOR_TARGET: " .. eessi_accelerator_target)
104107
end
108+
109+
-- If architectures are 9.0, 10.0 or 12.0, enable architecture or family-specific optimizations
110+
if easybuild_cuda_compute_capabilities == '9.0' then
111+
easybuild_cuda_compute_capabilities = '9.0a'
112+
elseif easybuild_cuda_compute_capabilities == '10.0' then
113+
easybuild_cuda_compute_capabilities = '10.0f'
114+
elseif easybuild_cuda_compute_capabilities == '12.0' then
115+
easybuild_cuda_compute_capabilities = '12.0f'
116+
end
105117
end
106118
107119
-- Some environment variables affect behaviour, let's gather them once

eb_hooks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,9 @@ def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix):
502502
def parse_hook_ucx_eprefix(ec, eprefix):
503503
"""Make UCX aware of compatibility layer via additional configuration options."""
504504
if ec.name == 'UCX':
505-
ec.update('configopts', '--with-sysroot=%s' % eprefix)
505+
# Don't enable --with-sysroot, as it will prefix library paths in .la files
506+
# with a = sign, causing weird issues for applications that depend on UCX (and use libtool)
507+
# ec.update('configopts', '--with-sysroot=%s' % eprefix)
506508
ec.update('configopts', '--with-rdmacm=%s' % os.path.join(eprefix, 'usr'))
507509
print_msg("Using custom configure options for %s: %s", ec.name, ec['configopts'])
508510
else:

init/eessi_archdetect.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ accelpath() {
165165
# If EESSI_ACCELERATOR_TARGET_OVERRIDE is set, use it
166166
log "DEBUG" "accelpath: Override variable set as '$EESSI_ACCELERATOR_TARGET_OVERRIDE' "
167167
if [ ! -z $EESSI_ACCELERATOR_TARGET_OVERRIDE ]; then
168-
if [[ "$EESSI_ACCELERATOR_TARGET_OVERRIDE" =~ ^accel/nvidia/cc[0-9][0-9]$ ]]; then
168+
if [[ "$EESSI_ACCELERATOR_TARGET_OVERRIDE" =~ ^accel/nvidia/cc[0-9]+$ ]]; then
169169
echo ${EESSI_ACCELERATOR_TARGET_OVERRIDE}
170170
return 0
171171
else
172-
log "ERROR" "Value of \$EESSI_ACCELERATOR_TARGET_OVERRIDE should match 'accel/nvidia/cc[0-9[0-9]', but it does not: '$EESSI_ACCELERATOR_TARGET_OVERRIDE'"
172+
log "ERROR" "Value of \$EESSI_ACCELERATOR_TARGET_OVERRIDE should match 'accel/nvidia/cc[0-9]+', but it does not: '$EESSI_ACCELERATOR_TARGET_OVERRIDE'"
173173
fi
174174
return 0
175175
fi

init/eessi_defaults

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@
99

1010
export EESSI_VERSION_DEFAULT='__EESSI_VERSION_DEFAULT__'
1111

12-
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=${EESSI_VERSION_DEFAULT}}"
12+
# if $EESSI_VERSION_OVERRIDE is set and has a suffix, e.g. 2025.06-001,
13+
# we split it into EESSI_VERSION (2025.06) and EESSI_SOFTWARE_LAYER_VERSION_SUFFIX (-001)
14+
if [[ "${EESSI_VERSION_OVERRIDE}" == *-* ]]; then
15+
export EESSI_VERSION=${EESSI_VERSION_OVERRIDE%-*}
16+
export EESSI_SOFTWARE_LAYER_VERSION_SUFFIX="-${EESSI_VERSION_OVERRIDE#*-}"
17+
else
18+
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=${EESSI_VERSION_DEFAULT}}"
19+
export EESSI_SOFTWARE_LAYER_VERSION_SUFFIX=""
20+
fi
1321

1422
# use different defaults for RISC-V clients
1523
if [[ $(uname -m) == "riscv64" ]]; then

init/minimal_eessi_env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ EESSI_INIT_DIR_PATH=$(dirname $(readlink -f $BASH_SOURCE))
88
# script takes *_OVERRIDEs into account
99
source ${EESSI_INIT_DIR_PATH}/eessi_defaults
1010

11-
export EESSI_PREFIX=$EESSI_CVMFS_REPO/versions/$EESSI_VERSION
11+
export EESSI_PREFIX=$EESSI_CVMFS_REPO/versions/${EESSI_VERSION}${EESSI_SOFTWARE_LAYER_VERSION_SUFFIX}
1212

1313
if [[ $(uname -s) == 'Linux' ]]; then
1414
export EESSI_OS_TYPE='linux'

init/modules/EESSI/2023.06.lua

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,18 @@ local eessi_repo = "/cvmfs/software.eessi.io"
1616
local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version)
1717
local eessi_compat_prefix = pathJoin(eessi_prefix, "compat")
1818
local eessi_init_prefix = pathJoin(eessi_prefix, "init")
19+
local eessi_software_layer_version_suffix = ""
1920
local eessi_os_type = "linux"
2021
-- for RISC-V clients we need to do some overrides, as things are stored in different CVMFS repositories
2122
if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then
2223
if (eessi_version == "2023.06" or eessi_version == "20240402") then
23-
eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or "20240402"
24+
eessi_version_override = os.getenv("EESSI_VERSION_OVERRIDE") or ""
25+
index_suffix = string.find(eessi_version_override, '-')
26+
if index_suffix then
27+
eessi_software_layer_version_suffix = string.sub(eessi_version_override, index_suffix)
28+
end
2429
eessi_repo = "/cvmfs/riscv.eessi.io"
25-
eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version)
30+
eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version .. eessi_software_layer_version_suffix)
2631
eessi_compat_prefix = pathJoin(eessi_prefix, "compat")
2732
if mode() == "load" then
2833
LmodMessage("RISC-V architecture detected, but there is no RISC-V support yet in the production repository.\n" ..
@@ -139,6 +144,8 @@ prepend_path("PATH", pathJoin(eessi_eprefix, "bin"))
139144
eessiDebug("Adding " .. pathJoin(eessi_eprefix, "bin") .. " to PATH")
140145
prepend_path("PATH", pathJoin(eessi_eprefix, "usr", "bin"))
141146
eessiDebug("Adding " .. pathJoin(eessi_eprefix, "usr", "bin") .. " to PATH")
147+
setenv("EESSI_SOFTWARE_LAYER_VERSION_SUFFIX", eessi_software_layer_version_suffix)
148+
eessiDebug("Setting EESSI_SOFTWARE_LAYER_VERSION_SUFFIX to " .. eessi_software_layer_version_suffix)
142149
setenv("EESSI_SOFTWARE_PATH", eessi_software_path)
143150
eessiDebug("Setting EESSI_SOFTWARE_PATH to " .. eessi_software_path)
144151
setenv("EESSI_MODULEPATH", eessi_module_path)

0 commit comments

Comments
 (0)