Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0fcaacb
Update site package behavior to allow specifying a custom EESSI_SITE_…
May 19, 2026
a3229cf
Merge branch 'main' into update_site_package_behavior
May 19, 2026
a226976
use eessi_repo variable instead of os.getenv("EESSI_CVMFS_REPO")
bedroge May 22, 2026
e1a6d5d
Merge branch 'main' into update_site_package_behavior
bedroge May 22, 2026
8151942
take EESSI_SITE_SOFTWARE_PREFIX into account, and add site's Lmod RC …
bedroge May 22, 2026
7b44e69
Merge pull request #4 from bedroge/update_site_package_behavior
casparvl May 22, 2026
dc32c97
Add proper quoting everywhere. Most of these never went wrong because…
May 22, 2026
22c9c9b
Add verbosito for EESSI_SITE_SOFTWARE_PATH
May 22, 2026
3af956c
Make sure to also handle the EESSI_SITE_ACCEL_SOFTWARE_PATH
May 22, 2026
2ed0a52
Also make sure to respect the EESSI_SITE_SOFTWARE_PREFIX for the site…
May 22, 2026
0e95025
Make addition of EESSI_SITE_MODULEPATH_ACCEL conditional on whether t…
May 22, 2026
046bfde
string.gsub fails if eessi_module_path_accel is undefined (nil). Guar…
May 22, 2026
f0dafeb
Guard against eessi_module_path_accel being nil
May 22, 2026
9849e35
Try to make the validation pass again: the module now only set the EE…
May 22, 2026
7b328cc
Do variables in the correct order when doing variable expansion for r…
May 22, 2026
96f0d1d
Fix mistake in testing the existence of the wrong variable
May 22, 2026
8e78e0c
Fix env var name to get the accelerator subdir
May 22, 2026
b34dbd7
Try to figure out why host_injections is a file instead of a dir. Sho…
May 22, 2026
d17e970
Let's add -v, to see which dir actually gets created, as we still see…
May 22, 2026
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
5 changes: 5 additions & 0 deletions .github/workflows/tests_eessi_module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ jobs:
# Do (and undo) loading the EESSI module
CPU_ARCH=$(./init/eessi_archdetect.sh -a cpupath)
module load EESSI/${{matrix.EESSI_VERSION}}
# We create this dir the the verify_eessi_environment.py later on, since the EESSI_SITE_MODULEPATH_ACCEL
# will only be set if this dir exists - and we can most easily create it here, where we have
# EESSI_SITE_SOFTWARE_PATH and EESSI_ACCEL_SOFTWARE_SUBDIR available
mkdir -p /opt/eessi
mkdir -p -v "$EESSI_SITE_SOFTWARE_PATH/$EESSI_ACCEL_SUBDIR"
module unload EESSI/${{matrix.EESSI_VERSION}}
env | grep -v _ModuleTable | sort > "${module_cycled_file}"

Expand Down
2 changes: 1 addition & 1 deletion init/bash
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [ $? -eq 0 ]; then
show_msg "Prepending site path $EESSI_SITE_MODULEPATH to \$MODULEPATH..."
module use $EESSI_SITE_MODULEPATH

if [ ! -z ${EESSI_MODULEPATH_ACCEL} ]; then
if [ ! -z ${EESSI_SITE_MODULEPATH_ACCEL} ]; then
show_msg "Prepending $EESSI_SITE_MODULEPATH_ACCEL to \$MODULEPATH..."
module use $EESSI_SITE_MODULEPATH_ACCEL
fi
Expand Down
78 changes: 48 additions & 30 deletions init/eessi_environment_variables
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ function show_msg {
# set up minimal environment: $EESSI_PREFIX, $EESSI_VERSION, $EESSI_OS_TYPE, $EESSI_CPU_FAMILY, $EPREFIX
source $EESSI_INIT_DIR_PATH/minimal_eessi_env

if [ -d $EESSI_PREFIX ]; then
if [ -d "$EESSI_PREFIX" ]; then
show_msg "Found EESSI repo @ $EESSI_PREFIX!"

export EESSI_EPREFIX=$EPREFIX
if [ -d $EESSI_EPREFIX ]; then
export EESSI_EPREFIX="$EPREFIX"
if [ -d "$EESSI_EPREFIX" ]; then

# determine subdirectory in software layer
if [ "$EESSI_USE_ARCHDETECT" == "1" ]; then
Expand All @@ -32,8 +32,8 @@ if [ -d $EESSI_PREFIX ]; then
# under $EESSI_PREFIX/software/$EESSI_OS_TYPE; if so use the architecture as best match
IFS=: read -r -a archs <<< "${all_cpupaths}"
for arch in "${archs[@]}"; do
if [ -d ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${arch} ]; then
export EESSI_SOFTWARE_SUBDIR=${arch}
if [ -d "${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${arch}" ]; then
export EESSI_SOFTWARE_SUBDIR="${arch}"
show_msg "archdetect says ${EESSI_SOFTWARE_SUBDIR}"
break
fi
Expand All @@ -58,23 +58,23 @@ if [ -d $EESSI_PREFIX ]; then
set -e
fi

if [[ $accelpath_exit_code -eq 0 ]]; then
if [[ "$accelpath_exit_code" -eq 0 ]]; then
export EESSI_ACCEL_SUBDIR=$(tail -n 1 $tmpout && rm -f $tmpout)
if [ -z ${EESSI_ACCEL_SUBDIR} ]; then
if [ -z "${EESSI_ACCEL_SUBDIR}" ]; then
error "accelerator detection with archdetect worked, but no result was returned?!"
else
# allow specifying different parent directory for accel/* subdirectory via $EESSI_ACCEL_SOFTWARE_SUBDIR_OVERRIDE
EESSI_ACCEL_SOFTWARE_SUBDIR=${EESSI_ACCEL_SOFTWARE_SUBDIR_OVERRIDE:-$EESSI_SOFTWARE_SUBDIR}
EESSI_ACCEL_SOFTWARE_SUBDIR="${EESSI_ACCEL_SOFTWARE_SUBDIR_OVERRIDE:-$EESSI_SOFTWARE_SUBDIR}"
# path to where accel/* subdirectory is located
EESSI_ACCEL_SOFTWARE_PATH=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_ACCEL_SOFTWARE_SUBDIR}
if [ ! -d $EESSI_ACCEL_SOFTWARE_PATH/${EESSI_ACCEL_SUBDIR} ]; then
EESSI_ACCEL_SOFTWARE_PATH="${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_ACCEL_SOFTWARE_SUBDIR}"
if [ ! -d "$EESSI_ACCEL_SOFTWARE_PATH/${EESSI_ACCEL_SUBDIR}" ]; then
# We should try to use the fallback compute capability
EESSI_ACCELERATOR_TARGET="${EESSI_ACCEL_SUBDIR::-1}0"
show_msg "archdetect found no supported accelerator ${EESSI_ACCEL_SUBDIR}, falling back to ${EESSI_ACCELERATOR_TARGET}"
else
EESSI_ACCELERATOR_TARGET="${EESSI_ACCEL_SUBDIR}"
fi
if [ -d $EESSI_ACCEL_SOFTWARE_PATH/${EESSI_ACCELERATOR_TARGET} ]; then
if [ -d "$EESSI_ACCEL_SOFTWARE_PATH/${EESSI_ACCELERATOR_TARGET}" ]; then
show_msg "archdetect found supported accelerator for CPU target ${EESSI_ACCEL_SOFTWARE_SUBDIR}: ${EESSI_ACCELERATOR_TARGET}"
export EESSI_ACCELERATOR_TARGET
else
Expand All @@ -83,7 +83,7 @@ if [ -d $EESSI_PREFIX ]; then
fi
else
show_msg "archdetect could not detect any accelerators"
rm -f $tmpout
rm -f "$tmpout"
fi
elif [ "$EESSI_USE_ARCHSPEC" == "1" ]; then
# note: eessi_software_subdir_for_host.py will pick up value from $EESSI_SOFTWARE_SUBDIR_OVERRIDE if it's defined!
Expand All @@ -93,15 +93,15 @@ if [ -d $EESSI_PREFIX ]; then
else
error "Don't know how to detect host CPU, giving up!"
fi
if [ ! -z $EESSI_SOFTWARE_SUBDIR ]; then
if [ ! -z "$EESSI_SOFTWARE_SUBDIR" ]; then

show_msg "Using ${EESSI_SOFTWARE_SUBDIR} as software subdirectory."
export EESSI_SOFTWARE_PATH=$EESSI_PREFIX/software/$EESSI_OS_TYPE/$EESSI_SOFTWARE_SUBDIR
export EESSI_SOFTWARE_PATH="$EESSI_PREFIX/software/$EESSI_OS_TYPE/$EESSI_SOFTWARE_SUBDIR"

# Configure our LMOD
export LMOD_CONFIG_DIR="$EESSI_SOFTWARE_PATH/.lmod"
lmod_rc_file="$LMOD_CONFIG_DIR/lmodrc.lua"
if [ -f $lmod_rc_file ]; then
if [ -f "$lmod_rc_file" ]; then
show_msg "Found Lmod configuration file at $lmod_rc_file"
export LMOD_RC="$lmod_rc_file"
else
Expand All @@ -110,19 +110,35 @@ if [ -d $EESSI_PREFIX ]; then

export LMOD_PACKAGE_PATH="$EESSI_SOFTWARE_PATH/.lmod"
lmod_sitepackage_file="$LMOD_PACKAGE_PATH/SitePackage.lua"
if [ -f $lmod_sitepackage_file ]; then
if [ -f "$lmod_sitepackage_file" ]; then
show_msg "Found Lmod SitePackage.lua file at $lmod_sitepackage_file"
else
error "Lmod SitePackage.lua file not found at $lmod_sitepackage_file"
fi

if [ ! -z $EESSI_BASIC_ENV ]; then
if [ ! -z "$EESSI_BASIC_ENV" ]; then
show_msg "Only setting up basic environment, so we're done"
elif [ -d $EESSI_SOFTWARE_PATH ]; then
export EESSI_SITE_SOFTWARE_PATH=${EESSI_SOFTWARE_PATH/versions/host_injections}
elif [ -d "$EESSI_SOFTWARE_PATH" ]; then
if [ -z "${EESSI_SITE_SOFTWARE_PREFIX}" ]; then
site_software_path="${EESSI_SOFTWARE_PATH/versions/host_injections}"
site_software_accel_path="${EESSI_ACCEL_SOFTWARE_PATH/versions/host_injections}"
else
site_software_path="${EESSI_SOFTWARE_PATH/$EESSI_CVMFS_REPO/$EESSI_SITE_SOFTWARE_PREFIX}"
site_software_accel_path="${EESSI_ACCEL_SOFTWARE_PATH/$EESSI_CVMFS_REPO/$EESSI_SITE_SOFTWARE_PREFIX}"
fi
export EESSI_SITE_SOFTWARE_PATH="${site_software_path}"
show_msg "Using ${EESSI_SITE_SOFTWARE_PATH} as the site extension directory for installations."
EESSI_SITE_ACCEL_SOFTWARE_PATH=${EESSI_ACCEL_SOFTWARE_PATH/versions/host_injections}
EESSI_SITE_ACCEL_SOFTWARE_PATH="${site_software_accel_path}"
show_msg "Using ${EESSI_SITE_ACCEL_SOFTWARE_PATH} as the site extension directory for accelerated installations."

# Prepend site's lmodrc.lua path to $LMOD_RC
show_msg "Adding Lmod site configuration file path ($site_lmod_rc_file) to $LMOD_RC"
site_lmod_rc_file="$EESSI_SITE_SOFTWARE_PATH/.lmod/lmodrc.lua"
if [ -z "${LMOD_RC}" ]; then
export LMOD_RC="$site_lmod_rc_file"
else
export LMOD_RC="$site_lmod_rc_file:$LMOD_RC"
fi
# Allow for use of alternative module tree shipped with EESSI
if [ -z ${EESSI_MODULE_SUBDIR+x} ]; then
# EESSI_MODULE_SUBDIR not set
Expand All @@ -132,26 +148,28 @@ if [ -d $EESSI_PREFIX ]; then
if [ -z ${EESSI_CUSTOM_MODULEPATH+x} ]; then
# EESSI_CUSTOM_MODULEPATH not set so we use our defaults

EESSI_MODULEPATH=$EESSI_SOFTWARE_PATH/$EESSI_MODULE_SUBDIR
EESSI_MODULEPATH="$EESSI_SOFTWARE_PATH/$EESSI_MODULE_SUBDIR"
else
show_msg "Using defined environment variable \$EESSI_CUSTOM_MODULEPATH to set EESSI_MODULEPATH."
EESSI_MODULEPATH=$EESSI_CUSTOM_MODULEPATH
EESSI_MODULEPATH="$EESSI_CUSTOM_MODULEPATH"
fi

if [ -d $EESSI_MODULEPATH ]; then
export EESSI_MODULEPATH=$EESSI_MODULEPATH
if [ -d "$EESSI_MODULEPATH" ]; then
export EESSI_MODULEPATH="$EESSI_MODULEPATH"
show_msg "Using ${EESSI_MODULEPATH} as the directory to be added to MODULEPATH."
export EESSI_SITE_MODULEPATH=$EESSI_SITE_SOFTWARE_PATH/$EESSI_MODULE_SUBDIR
export EESSI_SITE_MODULEPATH="$EESSI_SITE_SOFTWARE_PATH/$EESSI_MODULE_SUBDIR"
show_msg "Using ${EESSI_SITE_MODULEPATH} as the site extension directory to be added to MODULEPATH."
else
error "EESSI module path at $EESSI_MODULEPATH not found!"
false
fi

if [ -d ${EESSI_ACCEL_SOFTWARE_PATH}/${EESSI_ACCELERATOR_TARGET}/${EESSI_MODULE_SUBDIR} ]; then
export EESSI_MODULEPATH_ACCEL=${EESSI_ACCEL_SOFTWARE_PATH}/${EESSI_ACCELERATOR_TARGET}/${EESSI_MODULE_SUBDIR}
if [ -d "${EESSI_ACCEL_SOFTWARE_PATH}/${EESSI_ACCELERATOR_TARGET}/${EESSI_MODULE_SUBDIR}" ]; then
export EESSI_MODULEPATH_ACCEL="${EESSI_ACCEL_SOFTWARE_PATH}/${EESSI_ACCELERATOR_TARGET}/${EESSI_MODULE_SUBDIR}"
show_msg "Using ${EESSI_MODULEPATH_ACCEL} as additional directory (for accelerators) to be added to MODULEPATH."
export EESSI_SITE_MODULEPATH_ACCEL=${EESSI_SITE_ACCEL_SOFTWARE_PATH}/${EESSI_ACCELERATOR_TARGET}/${EESSI_MODULE_SUBDIR}
fi
if [ -d "${EESSI_SITE_ACCEL_SOFTWARE_PATH}/${EESSI_ACCELERATOR_TARGET}/${EESSI_MODULE_SUBDIR}" ]; then
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this in sync with the change in 2023.06.lua, which now conditionally adds the site accerator path if that accelerator path exists - ie this check:

if isDir(eessi_module_path_site_accel) then

export EESSI_SITE_MODULEPATH_ACCEL="${EESSI_SITE_ACCEL_SOFTWARE_PATH}/${EESSI_ACCELERATOR_TARGET}/${EESSI_MODULE_SUBDIR}"
show_msg "Using ${EESSI_SITE_MODULEPATH_ACCEL} as additional site extension directory (for accelerators) to be added to MODULEPATH."
fi

Expand All @@ -160,9 +178,9 @@ if [ -d $EESSI_PREFIX ]; then
# curl as a module file we could instead do this via a `modluafooter` in an EasyBuild
# hook (or via an Lmod hook)
rhel_libcurl_file="/etc/pki/tls/certs/ca-bundle.crt"
if [ -f $rhel_libcurl_file ]; then
if [ -f "$rhel_libcurl_file" ]; then
show_msg "Found libcurl CAs file at RHEL location, setting CURL_CA_BUNDLE"
export CURL_CA_BUNDLE=$rhel_libcurl_file
export CURL_CA_BUNDLE="$rhel_libcurl_file"
fi

else
Expand Down
39 changes: 33 additions & 6 deletions init/modules/EESSI/2023.06.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,16 @@ 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/<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")
local eessi_site_software_path
-- If EESSI_SITE_SOFTWARE_PREFIX is defined, replace /cvmfs/software.eessi.io (or more generally EESSI_CVMFS_REPO)
-- by that prefix. This ensures that the directory still contains the os/vendor/arch/micro-arch/accelerator etc
-- If it is not defined, default to a site installation prefix under host_injections
site_prefix = os.getenv("EESSI_SITE_SOFTWARE_PREFIX")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love this approach, there is value in having the path in a fully defined location.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it more, and I am coming around. I was a bit stuck on having the fixed path because we require a fixed path to be able to do MPI injection. However, these are actually separate issues and this change doesn't affect that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will require some documentation updates, and some additional checks in EESSI-extend. We should also update the dev.eessi.io workflow to use this.

Issues for all these are enough for now, but they should be addressed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caspar and I discussed this quite a bit yesterday. In some way I also still prefer to have everything in a single and fixed location, but I also see Caspar's point, and being able to do the software installations elsewhere does make sense to me. I still have some concerns, e.g. about where to put the Lmod site hooks: Caspar wanted to keep them under host_injections, as they (may) also affect EESSI modules, and though that makes sense, it does mean that you may have two locations with this 2023.06/software/x86_64/amd/zen3 trees (one for locally built software, one for Lmod hooks). Same question for the site's Lmod cache: for that one it does definitely make sense to store them near the software, meaning you will end up with two of those .lmod directories in different places. Personally, I still don't really like that, it can easily confuse users/admins.

The current situation, with just a single host_injection directory, also has some drawbacks, e.g. in case you want to do site installations on a local CVMFS repo, while having MPI/GPU libraries on a local disk. You can do it by doing some symlink trickery, but that's not ideal either.

Anyway, since the default behavior won't change, I was okay with adding the possibility for overriding the software installation prefix.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to hear you've come around - I do feel that at least having the option as a site to configure it is something we should offer. Whether a site uses it, or prefers redirecting the host-injections symlink (or making e.g. /cvmfs/software.eessi.io/host_injections/2025.06 a symlink, as @ocaisa suggested on chat) are then just a choice that every site has.

I'd personally like to use the environment variable. And I'd probably set it in an internal lmod hook, so that it's set at the moment users load the EESSI module - that way users can't unset it either.

Companion PR for EESSI-extend is here #235

I'll make issues for the rest. I think we should do the documentation updates once we've actually taken the whole new functionality for practical test - I'm hoping the idea is more clear after the webinar :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also update the dev.eessi.io workflow to use this.

And yes, if this works well, I think it's nice to make dev.eessi.io use this, as it is essentially also 'building on top' of EESSI.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs issue: EESSI/docs#768
software-layer-scripts issue to update dev.eessi.io workflow #236

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimal docs update here EESSI/docs#769 (we should still have more extensive docs on how to build on top of EESSI as a site, but that's what EESSI/docs#768 is for).

if site_prefix then
eessi_site_software_path = string.gsub(eessi_software_path, eessi_repo, site_prefix)
else
eessi_site_software_path = string.gsub(eessi_software_path, "versions", "host_injections")
end
-- 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/<EESSI_VERSION>/software/linux/x86_64/amd/zen3/modules/all
local eessi_site_module_path = pathJoin(eessi_site_software_path, eessi_modules_subdir)
Expand Down Expand Up @@ -169,8 +178,14 @@ if ( mode() ~= "spider" ) then
prepend_path("MODULEPATH", eessi_module_path)
eessiDebug("Adding " .. eessi_module_path .. " to MODULEPATH")
end

-- Make sure the EESSI cache is found, this is specified in the lmodrc.lua in the eessi_software_path
prepend_path("LMOD_RC", pathJoin(eessi_software_path, ".lmod", "lmodrc.lua"))
eessiDebug("Adding " .. pathJoin(eessi_software_path, ".lmod", "lmodrc.lua") .. " to LMOD_RC")
-- Make sure that a cache for site installations can also be found
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to generate the cache also needs an update, but I need to check that works first. We need to let Lmod know that the module path requires a gateway module, then the hierarchy can be represented in the cache.

It's a separate issue, this just reminds me that I need to look into it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we currently even support caches for local installation? Caspar and I looked into that a bit yesterday, but we couldn't find anything. We plan to cover this in the tutorial, but we should indeed also add documentation for this. With Caspar's proposed change, sites can easily call the create_lmodrc.py from our repo to generate the lmodrc.lua file for their local stack (the EESSI module will then add it to $LMOD_RC), and then it should just be a matter of calling for instance https://github.com/EESSI/filesystem-layer/blob/main/scripts/update_lmod_caches.sh to actually generate the cache files.

prepend_path("LMOD_RC", pathJoin(eessi_site_software_path , ".lmod", "lmodrc.lua"))
eessiDebug("Adding " .. pathJoin(eessi_site_software_path , ".lmod", "lmodrc.lua") .. " to LMOD_RC")

-- Use pushenv for LMOD_PACKAGE_PATH as this may be set locally by the site
pushenv("LMOD_PACKAGE_PATH", pathJoin(eessi_software_path, ".lmod"))
eessiDebug("Setting LMOD_PACKAGE_PATH to " .. pathJoin(eessi_software_path, ".lmod"))
Expand Down Expand Up @@ -210,11 +225,23 @@ end
-- prepend the site module path last so it has priority
prepend_path("MODULEPATH", eessi_site_module_path)
eessiDebug("Adding " .. eessi_site_module_path .. " to MODULEPATH")
if isDir(eessi_module_path_accel) then
eessi_module_path_site_accel = string.gsub(eessi_module_path_accel, "versions", "host_injections")
setenv("EESSI_SITE_MODULEPATH_ACCEL", eessi_module_path_site_accel)
prepend_path("MODULEPATH", eessi_module_path_site_accel)
eessiDebug("Using site accelerator modules at: " .. eessi_module_path_site_accel)

-- If EESSI_SITE_SOFTWARE_PREFIX is defined, replace /cvmfs/software.eessi.io (or more generally EESSI_CVMFS_REPO)
-- by that prefix to get the site accelerator path. This ensures that the directory still contains the
-- os/vendor/arch/micro-arch/accelerator etc. If it is not defined, default to a site installation prefix under
-- host_injections
-- Note that we need the eessi_module_path_accel to construct either of these site installation accelerator paths
if eessi_module_path_accel then
if site_prefix then
eessi_module_path_site_accel = string.gsub(eessi_module_path_accel, eessi_repo, site_prefix)
else
eessi_module_path_site_accel = string.gsub(eessi_module_path_accel, "versions", "host_injections")
end
if isDir(eessi_module_path_site_accel) then
setenv("EESSI_SITE_MODULEPATH_ACCEL", eessi_module_path_site_accel)
prepend_path("MODULEPATH", eessi_module_path_site_accel)
eessiDebug("Using site accelerator modules at: " .. eessi_module_path_site_accel)
end
end

-- allow sites to add a family directive to the EESSI module,
Expand Down
Loading