Skip to content

Commit 71e7bc5

Browse files
committed
pick up RISC-V software installations from dev repo
1 parent c8fb7cb commit 71e7bc5

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

init/modules/EESSI/2023.06.lua

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,24 @@ conflict("EESSI")
1313
-- this is a version-agnostic module file, works for EESSI/2023.06, EESSI/2025.06, etc.
1414
local eessi_version = myModuleVersion()
1515
local eessi_repo = "/cvmfs/software.eessi.io"
16+
local eessi_archdetect_prefix = pathJoin(eessi_repo, "versions", eessi_version, "init")
17+
-- for RISC-V clients we need to do some overrides, as things are stored in different CVMFS repositories
1618
if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then
17-
eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or "20240402"
18-
eessi_repo = "/cvmfs/riscv.eessi.io"
19-
LmodMessage("RISC-V architecture detected, but there is no RISC-V support yet in the production repository.\n" ..
20-
"Automatically switching to version " .. eessi_version .. " of the RISC-V development repository " .. eessi_repo .. ".\n" ..
21-
"For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/.")
19+
if (eessi_version == "2023.06") then
20+
eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or "20240402"
21+
eessi_repo = "/cvmfs/riscv.eessi.io"
22+
LmodMessage("RISC-V architecture detected, but there is no RISC-V support yet in the production repository.\n" ..
23+
"Automatically switching to version " .. eessi_version .. " of the RISC-V development repository " .. eessi_repo .. ".\n" ..
24+
"For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/.")
25+
elseif (eessi_version == "2025.06") then
26+
eessi_repo = "/cvmfs/dev.eessi.io/riscv"
27+
LmodMessage("This EESSI production version only provides a RISC-V compatibility layer,\n" ..
28+
"software installations are provided by the EESSI development repository at " .. eessi_repo .. ".\n")
29+
if not isDir(eessi_repo) then
30+
LmodError("The EESSI development repository dev.eessi.io is not mounted on your system.\n" ..
31+
"This is required for RISC-V systems.")
32+
end
33+
end
2234
end
2335
local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version)
2436
local eessi_os_type = "linux"
@@ -32,7 +44,7 @@ function eessiDebug(text)
3244
end
3345
end
3446
function archdetect_cpu()
35-
local script = pathJoin(eessi_prefix, 'init', 'lmod_eessi_archdetect_wrapper.sh')
47+
local script = pathJoin(eessi_archdetect_prefix, 'lmod_eessi_archdetect_wrapper.sh')
3648
-- make sure that we grab the value for architecture before the module unsets the environment variable (in unload mode)
3749
local archdetect_options = os.getenv("EESSI_ARCHDETECT_OPTIONS") or (os.getenv("EESSI_ARCHDETECT_OPTIONS_OVERRIDE") or "")
3850
if not os.getenv("EESSI_ARCHDETECT_OPTIONS_OVERRIDE") then
@@ -62,7 +74,7 @@ function archdetect_cpu()
6274
end
6375
end
6476
function archdetect_accel()
65-
local script = pathJoin(eessi_prefix, 'init', 'lmod_eessi_archdetect_wrapper_accel.sh')
77+
local script = pathJoin(eessi_archdetect_prefix, 'lmod_eessi_archdetect_wrapper_accel.sh')
6678
-- for unload mode, we need to grab the value before it is unset
6779
local archdetect_accel = os.getenv("EESSI_ACCEL_SUBDIR") or (os.getenv("EESSI_ACCELERATOR_TARGET_OVERRIDE") or "")
6880
if not os.getenv("EESSI_ACCELERATOR_TARGET_OVERRIDE") then

0 commit comments

Comments
 (0)