diff --git a/EESSI-extend-easybuild.eb b/EESSI-extend-easybuild.eb index 85113e84..1aa8be4e 100644 --- a/EESSI-extend-easybuild.eb +++ b/EESSI-extend-easybuild.eb @@ -176,7 +176,8 @@ end setenv ("EASYBUILD_SYSROOT", sysroot) setenv ("EASYBUILD_PREFIX", pathJoin(working_dir, "easybuild")) setenv ("EASYBUILD_INSTALLPATH", easybuild_installpath) -setenv ("EASYBUILD_HOOKS", pathJoin(os.getenv("EESSI_PREFIX"), "init", "easybuild", "eb_hooks.py")) +eessi_init_prefix = os.getenv("EESSI_INIT_PREFIX") or pathJoin(os.getenv("EESSI_PREFIX"), "init") +setenv ("EASYBUILD_HOOKS", pathJoin(eessi_init_prefix, "easybuild", "eb_hooks.py")) -- Make sure to use the general umask that allows a global read setenv ("EASYBUILD_UMASK", "022") diff --git a/init/eessi_defaults b/init/eessi_defaults index 4b0c9e9d..f8265347 100644 --- a/init/eessi_defaults +++ b/init/eessi_defaults @@ -10,19 +10,32 @@ export EESSI_VERSION_DEFAULT='__EESSI_VERSION_DEFAULT__' -# use different defaults for RISC-V, as we want to redirect to the riscv.eessi.io repo +# use different defaults for RISC-V clients if [[ $(uname -m) == "riscv64" ]]; then - export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/riscv.eessi.io}" - export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=20240402}" - if [[ -z ${EESSI_SILENT+x} ]]; then - echo "RISC-V architecture detected, but there is no RISC-V support yet in the production repository." - echo "Automatically switching to version ${EESSI_VERSION} of the RISC-V development repository ${EESSI_CVMFS_REPO}." - echo "For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/." - echo "" + export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:-${EESSI_VERSION_DEFAULT}}" + if [[ "${EESSI_VERSION}" == "2023.06" ]] || [[ "${EESSI_VERSION}" == "20240402" ]]; then + export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=20240402}" + export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/riscv.eessi.io}" + export EESSI_INIT_PREFIX="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init" + if [[ -z ${EESSI_SILENT+x} ]]; then + echo "RISC-V architecture detected, but there is no RISC-V support yet in the production repository." + echo "Automatically switching to version ${EESSI_VERSION} of the RISC-V development repository ${EESSI_CVMFS_REPO}." + echo "For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/." + echo "" + fi + elif [[ "${EESSI_VERSION_DEFAULT}" == "2025.06" ]]; then + export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/dev.eessi.io/riscv}" + export EESSI_COMPAT_LAYER_DIR="/cvmfs/software.eessi.io/versions/${EESSI_VERSION_DEFAULT}/compat/linux/$(uname -m)" + export EESSI_INIT_PREFIX="/cvmfs/software.eessi.io/versions/${EESSI_VERSION_DEFAULT}/init" + if [[ -z ${EESSI_SILENT+x} ]]; then + echo "This EESSI production version only provides a RISC-V compatibility layer," + echo "software installations are provided by the EESSI development repository at ${EESSI_CVMFS_REPO}." + fi fi else export EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO_OVERRIDE:=/cvmfs/software.eessi.io}" export EESSI_VERSION="${EESSI_VERSION_OVERRIDE:=${EESSI_VERSION_DEFAULT}}" + export EESSI_INIT_PREFIX="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init" fi # use archdetect by default, unless otherwise specified export EESSI_USE_ARCHDETECT="${EESSI_USE_ARCHDETECT:=1}" diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index d8a83efb..2ddcf194 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -15,7 +15,7 @@ local eessi_version = myModuleVersion() local eessi_repo = "/cvmfs/software.eessi.io" local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) local eessi_compat_prefix = pathJoin(eessi_prefix, "compat") -local eessi_archdetect_prefix = pathJoin(eessi_prefix, "init") +local eessi_init_prefix = pathJoin(eessi_prefix, "init") local eessi_os_type = "linux" -- for RISC-V clients we need to do some overrides, as things are stored in different CVMFS repositories if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then @@ -53,7 +53,7 @@ function eessiDebug(text) end end function archdetect_cpu() - local script = pathJoin(eessi_archdetect_prefix, 'lmod_eessi_archdetect_wrapper.sh') + local script = pathJoin(eessi_init_prefix, 'lmod_eessi_archdetect_wrapper.sh') -- make sure that we grab the value for architecture before the module unsets the environment variable (in unload mode) local archdetect_options = os.getenv("EESSI_ARCHDETECT_OPTIONS") or (os.getenv("EESSI_ARCHDETECT_OPTIONS_OVERRIDE") or "") if not os.getenv("EESSI_ARCHDETECT_OPTIONS_OVERRIDE") then @@ -83,7 +83,7 @@ function archdetect_cpu() end end function archdetect_accel() - local script = pathJoin(eessi_archdetect_prefix, 'lmod_eessi_archdetect_wrapper_accel.sh') + local script = pathJoin(eessi_init_prefix, 'lmod_eessi_archdetect_wrapper_accel.sh') -- for unload mode, we need to grab the value before it is unset local archdetect_accel = os.getenv("EESSI_ACCEL_SUBDIR") or (os.getenv("EESSI_ACCELERATOR_TARGET_OVERRIDE") or "") if not os.getenv("EESSI_ACCELERATOR_TARGET_OVERRIDE") then @@ -131,6 +131,8 @@ setenv("EESSI_SOFTWARE_SUBDIR", eessi_software_subdir) eessiDebug("Setting EESSI_SOFTWARE_SUBDIR to " .. eessi_software_subdir) setenv("EESSI_PREFIX", eessi_prefix) eessiDebug("Setting EESSI_PREFIX to " .. eessi_prefix) +setenv("EESSI_INIT_PREFIX", eessi_init_prefix) +eessiDebug("Setting EESSI_INIT_PREFIX to " .. eessi_init_prefix) setenv("EESSI_EPREFIX", eessi_eprefix) eessiDebug("Setting EPREFIX to " .. eessi_eprefix) prepend_path("PATH", pathJoin(eessi_eprefix, "bin")) diff --git a/run_in_compat_layer_env.sh b/run_in_compat_layer_env.sh index 188420e6..5966a651 100755 --- a/run_in_compat_layer_env.sh +++ b/run_in_compat_layer_env.sh @@ -56,6 +56,9 @@ fi if [ ! -z ${EASYBUILD_ROBOT_PATHS} ]; then INPUT="export EASYBUILD_ROBOT_PATHS=${EASYBUILD_ROBOT_PATHS}; ${INPUT}" fi +if [ ! -z ${EESSI_INIT_PREFIX} ]; then + INPUT="export EESSI_INIT_PREFIX=${EESSI_INIT_PREFIX}; ${INPUT}" +fi echo "Running '${INPUT}' in EESSI (${EESSI_CVMFS_REPO}) ${EESSI_VERSION} compatibility layer environment..." ${EESSI_COMPAT_LAYER_DIR}/startprefix <<< "${INPUT}"