@@ -13,15 +13,34 @@ conflict("EESSI")
13
13
-- this is a version-agnostic module file, works for EESSI/2023.06, EESSI/2025.06, etc.
14
14
local eessi_version = myModuleVersion ()
15
15
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
23
16
local eessi_prefix = pathJoin (eessi_repo , " versions" , eessi_version )
17
+ local eessi_archdetect_prefix = pathJoin (eessi_prefix , " init" )
24
18
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
25
44
setenv (" EESSI_VERSION_DEFAULT" , eessi_version )
26
45
setenv (" EESSI_VERSION" , eessi_version )
27
46
setenv (" EESSI_CVMFS_REPO" , eessi_repo )
@@ -32,7 +51,7 @@ function eessiDebug(text)
32
51
end
33
52
end
34
53
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' )
36
55
-- make sure that we grab the value for architecture before the module unsets the environment variable (in unload mode)
37
56
local archdetect_options = os.getenv (" EESSI_ARCHDETECT_OPTIONS" ) or (os.getenv (" EESSI_ARCHDETECT_OPTIONS_OVERRIDE" ) or " " )
38
57
if not os.getenv (" EESSI_ARCHDETECT_OPTIONS_OVERRIDE" ) then
@@ -62,7 +81,7 @@ function archdetect_cpu()
62
81
end
63
82
end
64
83
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' )
66
85
-- for unload mode, we need to grab the value before it is unset
67
86
local archdetect_accel = os.getenv (" EESSI_ACCEL_SUBDIR" ) or (os.getenv (" EESSI_ACCELERATOR_TARGET_OVERRIDE" ) or " " )
68
87
if not os.getenv (" EESSI_ACCELERATOR_TARGET_OVERRIDE" ) then
0 commit comments