Skip to content

add EESSI/2025.06 module file (+ populate scripts for all CPU targets in 2025.06 software layer) #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
28 changes: 14 additions & 14 deletions EESSI-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,20 @@ else
fatal_error "Failed to initialize Lmod?! (see output in ${ml_version_out}"
fi

# install any additional required scripts
# order is important: these are needed to install a full CUDA SDK in host_injections
# for now, this just reinstalls all scripts. Note the most elegant, but works

# the install_scripts.sh script relies on knowing the location of the PR diff
# assume there's only one diff file that corresponds to the PR patch file
pr_diff=$(ls [0-9]*.diff | head -1)
export PR_DIFF="$PWD/$pr_diff"

# Only run install_scripts.sh if not in dev.eessi.io for security
if [[ -z ${EESSI_DEV_PROJECT} ]]; then
${TOPDIR}/install_scripts.sh --prefix ${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION} --eessi-version ${EESSI_VERSION}
fi

# Make sure we start with no modules and clean $MODULEPATH
echo ">> Setting up \$MODULEPATH..."
module --force purge
Expand Down Expand Up @@ -238,20 +252,6 @@ if [ ! -f ${_lmod_sitepackage_file} ]; then
python3 ${TOPDIR}/create_lmodsitepackage.py ${_eessi_software_path}
fi

# install any additional required scripts
# order is important: these are needed to install a full CUDA SDK in host_injections
# for now, this just reinstalls all scripts. Note the most elegant, but works

# the install_scripts.sh script relies on knowing the location of the PR diff
# assume there's only one diff file that corresponds to the PR patch file
pr_diff=$(ls [0-9]*.diff | head -1)
export PR_DIFF="$PWD/$pr_diff"

# Only run install_scripts.sh if not in dev.eessi.io for security
if [[ -z ${EESSI_DEV_PROJECT} ]]; then
${TOPDIR}/install_scripts.sh --prefix ${EESSI_PREFIX}
fi

echo ">> Configuring EasyBuild..."

# Make sure EESSI-extend is not loaded, and configure location variables for a
Expand Down
2 changes: 1 addition & 1 deletion eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def parse_hook_zen4_module_only(ec, eprefix):
# Need to escape newline character so that the newline character actually ends up in the module file
# (otherwise, it splits the string, and a 2-line string ends up in the modulefile, resulting in syntax error)
errmsg = "EasyConfigs using toolchains based on GCCcore-12.2.0 are not supported for the Zen4 architecture.\\n"
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"
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"
ec['modluafooter'] = 'if (not os.getenv("%s")) then LmodError("%s") end' % (env_varname, errmsg)


Expand Down
4 changes: 3 additions & 1 deletion init/eessi_defaults
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# license: GPLv2
#

export EESSI_VERSION_DEFAULT='__EESSI_VERSION_DEFAULT__'

# use different defaults for RISC-V, as we want to redirect to the riscv.eessi.io repo
if [[ $(uname -m) == "riscv64" ]]; then
export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/riscv.eessi.io}"
Expand All @@ -20,7 +22,7 @@ if [[ $(uname -m) == "riscv64" ]]; then
fi
else
export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/software.eessi.io}"
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=2023.06}"
export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=${EESSI_VERSION_DEFAULT}}"
fi
# use archdetect by default, unless otherwise specified
export EESSI_USE_ARCHDETECT="${EESSI_USE_ARCHDETECT:=1}"
Expand Down
2 changes: 1 addition & 1 deletion init/lmod/zsh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Choose an EESSI CVMFS repository
EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}"
# Choose an EESSI version
EESSI_VERSION="${EESSI_VERSION:-2023.06}"
EESSI_VERSION="${EESSI_VERSION:-__EESSI_VERSION_DEFAULT__}"
# Path to top-level module tree
export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules"
. "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/zsh"
Expand Down
13 changes: 7 additions & 6 deletions init/modules/EESSI/2023.06.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ More information
whatis("Description: The European Environment for Scientific Software Installations (EESSI, pronounced as easy) is a collaboration between different European partners in HPC community. The goal of this project is to build a common stack of scientific software installations for HPC systems and beyond, including laptops, personal workstations and cloud infrastructure.")
whatis("URL: https://www.eessi.io/docs/")
conflict("EESSI")
-- this is a version-agnostic module file, works for EESSI/2023.06, EESSI/2025.06, etc.
local eessi_version = myModuleVersion()
local eessi_repo = "/cvmfs/software.eessi.io"
if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then
Expand Down Expand Up @@ -80,18 +81,18 @@ 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_software_subdir = archdetect
-- eessi_eprefix is the base location of the compat layer, e.g., /cvmfs/software.eessi.io/versions/2023.06/compat/linux/x86_64
-- eessi_eprefix is the base location of the compat layer, e.g., /cvmfs/software.eessi.io/versions/<EESSI_VERSION>/compat/linux/x86_64
local eessi_eprefix = pathJoin(eessi_prefix, "compat", eessi_os_type, eessi_cpu_family)
-- eessi_software_path is the location of the software installations, e.g.,
-- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3
-- /cvmfs/software.eessi.io/versions/<EESSI_VERSION>/software/linux/x86_64/amd/zen3
local eessi_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_software_subdir)
local eessi_modules_subdir = pathJoin("modules", "all")
-- eessi_module_path is the location of the _CPU_ module files, e.g.,
-- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3/modules/all
-- /cvmfs/software.eessi.io/versions/<EESSI_VERSION>/software/linux/x86_64/amd/zen3/modules/all
local eessi_module_path = pathJoin(eessi_software_path, eessi_modules_subdir)
local eessi_site_software_path = string.gsub(eessi_software_path, "versions", "host_injections")
-- Site module path is the same as the EESSI one, but with `versions` changed to `host_injections`, e.g.,
-- /cvmfs/software.eessi.io/host_injections/2023.06/software/linux/x86_64/amd/zen3/modules/all
-- /cvmfs/software.eessi.io/host_injections/<EESSI_VERSION>/software/linux/x86_64/amd/zen3/modules/all
local eessi_site_module_path = pathJoin(eessi_site_software_path, eessi_modules_subdir)
setenv("EPREFIX", eessi_eprefix)
eessiDebug("Setting EPREFIX to " .. eessi_eprefix)
Expand Down Expand Up @@ -134,10 +135,10 @@ if not (archdetect_accel == nil or archdetect_accel == '') then
-- The CPU subdirectory of the accelerator installations is _usually_ the same as host CPU, but this can be overridden
eessi_accel_software_subdir = os.getenv("EESSI_ACCEL_SOFTWARE_SUBDIR_OVERRIDE") or eessi_software_subdir
-- CPU location of the accelerator installations, e.g.,
-- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3
-- /cvmfs/software.eessi.io/versions/<EESSI_VERSION>/software/linux/x86_64/amd/zen3
eessi_accel_software_path = pathJoin(eessi_prefix, "software", eessi_os_type, eessi_accel_software_subdir)
-- location of the accelerator modules, e.g.,
-- /cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen3/accel/nvidia/cc80/modules/all
-- /cvmfs/software.eessi.io/versions/<EESSI_VERSION>/software/linux/x86_64/amd/zen3/accel/nvidia/cc80/modules/all
eessi_module_path_accel = pathJoin(eessi_accel_software_path, archdetect_accel, eessi_modules_subdir)
eessiDebug("Checking if " .. eessi_module_path_accel .. " exists")
if isDir(eessi_module_path_accel) then
Expand Down
1 change: 1 addition & 0 deletions init/modules/EESSI/2025.06.lua
39 changes: 36 additions & 3 deletions install_scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ compare_and_copy() {
if [ ! -f "$destination_file" ] || ! diff -q "$source_file" "$destination_file" ; then
echo "Files $source_file and $destination_file differ, checking if we should copy or not"
# We only copy if the file is part of the PR
if file_changed_in_pr "$source_file"; then
echo "File has changed in the PR"
if [ ! -f "${destination_file}" ] || file_changed_in_pr "$source_file"; then
if [ ! -f "${destination_file}" ]; then
echo "File has not been copied yet ($destination_file does not exist}"
else
echo "File has changed in the PR"
fi
cp "$source_file" "$destination_file"
echo "File $source_file copied to $destination_file"
else
Expand Down Expand Up @@ -100,6 +104,10 @@ POSITIONAL_ARGS=()

while [[ $# -gt 0 ]]; do
case $1 in
--eessi-version)
EESSI_VERSION="$2"
shift 2
;;
-p|--prefix)
INSTALL_PREFIX="$2"
shift 2
Expand All @@ -120,6 +128,16 @@ while [[ $# -gt 0 ]]; do
esac
done

if [ -z "${INSTALL_PREFIX}" ]; then
echo "EESSI prefix not specified, you must use --prefix" >&2
exit 2
fi

if [ -z "${EESSI_VERSION}" ]; then
echo "EESSI version not specified, you must use --eessi-version" >&2
exit 3
fi

set -- "${POSITIONAL_ARGS[@]}"

TOPDIR=$(dirname $(realpath $0))
Expand All @@ -146,7 +164,7 @@ copy_files_by_list ${TOPDIR}/init/Magic_Castle ${INSTALL_PREFIX}/init/Magic_Cast

# Copy for init/modules/EESSI directory
mc_files=(
2023.06.lua
${EESSI_VERSION}.lua
)
copy_files_by_list ${TOPDIR}/init/modules/EESSI ${INSTALL_PREFIX}/init/modules/EESSI "${mc_files[@]}"

Expand Down Expand Up @@ -183,3 +201,18 @@ hook_files=(
eb_hooks.py
)
copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX}/init/easybuild "${hook_files[@]}"


# make sure that scripts in init/ and scripts/ use correct EESSI version
sed -i "s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION}/g" ${INSTALL_PREFIX}/init/eessi_defaults

# replace placeholder for default EESSI version in Lmod init scripts
for shell in $(ls ${INSTALL_PREFIX}/init/lmod); do
sed -i "s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION}/g" ${INSTALL_PREFIX}/init/lmod/${shell}
done

# replace EESSI version used in comments in EESSI module
sed -i "s@/<EESSI_VERSION>/@/${EESSI_VERSION}/@g" ${INSTALL_PREFIX}/init/modules/EESSI/${EESSI_VERSION}.lua

# replace EESSI version used in EasyBuild hooks
sed -i "s@/<EESSI_VERSION>/@/${EESSI_VERSION}/@g" ${INSTALL_PREFIX}/init/easybuild/eb_hooks.py
Loading