Skip to content

Commit 02333d4

Browse files
authored
Merge pull request #80 from bedroge/riscv_2025.06
pick up RISC-V software installations from `/cvmfs/dev.eessi.io/riscv` for EESSI 2025.06
2 parents 5cccf70 + faa71e0 commit 02333d4

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

init/modules/EESSI/2023.06.lua

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,34 @@ 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-
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/.")
22-
end
2316
local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version)
17+
local eessi_archdetect_prefix = pathJoin(eessi_prefix, "init")
2418
local eessi_os_type = "linux"
19+
-- for RISC-V clients we need to do some overrides, as things are stored in different CVMFS repositories
20+
if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then
21+
if (eessi_version == "2023.06" or eessi_version == "20240402") then
22+
eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or "20240402"
23+
eessi_repo = "/cvmfs/riscv.eessi.io"
24+
eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version)
25+
if mode() == "load" then
26+
LmodMessage("RISC-V architecture detected, but there is no RISC-V support yet in the production repository.\n" ..
27+
"Automatically switching to version " .. eessi_version .. " of the RISC-V development repository " .. eessi_repo .. ".\n" ..
28+
"For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/.")
29+
end
30+
elseif (eessi_version == "2025.06") then
31+
eessi_repo = "/cvmfs/dev.eessi.io/riscv"
32+
eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or eessi_version
33+
eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version)
34+
if mode() == "load" then
35+
LmodMessage("This EESSI production version only provides a RISC-V compatibility layer,\n" ..
36+
"software installations are provided by the EESSI development repository at " .. eessi_repo .. ".\n")
37+
end
38+
if not isDir(eessi_repo) then
39+
LmodError("The EESSI development repository dev.eessi.io is not mounted on your system.\n" ..
40+
"This is required for RISC-V systems.")
41+
end
42+
end
43+
end
2544
setenv("EESSI_VERSION_DEFAULT", eessi_version)
2645
setenv("EESSI_VERSION", eessi_version)
2746
setenv("EESSI_CVMFS_REPO", eessi_repo)
@@ -32,7 +51,7 @@ function eessiDebug(text)
3251
end
3352
end
3453
function archdetect_cpu()
35-
local script = pathJoin(eessi_prefix, 'init', 'lmod_eessi_archdetect_wrapper.sh')
54+
local script = pathJoin(eessi_archdetect_prefix, 'lmod_eessi_archdetect_wrapper.sh')
3655
-- make sure that we grab the value for architecture before the module unsets the environment variable (in unload mode)
3756
local archdetect_options = os.getenv("EESSI_ARCHDETECT_OPTIONS") or (os.getenv("EESSI_ARCHDETECT_OPTIONS_OVERRIDE") or "")
3857
if not os.getenv("EESSI_ARCHDETECT_OPTIONS_OVERRIDE") then
@@ -62,7 +81,7 @@ function archdetect_cpu()
6281
end
6382
end
6483
function archdetect_accel()
65-
local script = pathJoin(eessi_prefix, 'init', 'lmod_eessi_archdetect_wrapper_accel.sh')
84+
local script = pathJoin(eessi_archdetect_prefix, 'lmod_eessi_archdetect_wrapper_accel.sh')
6685
-- for unload mode, we need to grab the value before it is unset
6786
local archdetect_accel = os.getenv("EESSI_ACCEL_SUBDIR") or (os.getenv("EESSI_ACCELERATOR_TARGET_OVERRIDE") or "")
6887
if not os.getenv("EESSI_ACCELERATOR_TARGET_OVERRIDE") then

0 commit comments

Comments
 (0)