From 71e7bc5ab4946037e75c6d7f4cf72f91600c1d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 3 Sep 2025 23:37:24 +0200 Subject: [PATCH 1/5] pick up RISC-V software installations from dev repo --- init/modules/EESSI/2023.06.lua | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 755929b2..14e0e175 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -13,12 +13,24 @@ conflict("EESSI") -- this is a version-agnostic module file, works for EESSI/2023.06, EESSI/2025.06, etc. local eessi_version = myModuleVersion() local eessi_repo = "/cvmfs/software.eessi.io" +local eessi_archdetect_prefix = pathJoin(eessi_repo, "versions", eessi_version, "init") +-- 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 - eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or "20240402" - eessi_repo = "/cvmfs/riscv.eessi.io" - LmodMessage("RISC-V architecture detected, but there is no RISC-V support yet in the production repository.\n" .. - "Automatically switching to version " .. eessi_version .. " of the RISC-V development repository " .. eessi_repo .. ".\n" .. - "For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/.") + if (eessi_version == "2023.06") then + eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or "20240402" + eessi_repo = "/cvmfs/riscv.eessi.io" + LmodMessage("RISC-V architecture detected, but there is no RISC-V support yet in the production repository.\n" .. + "Automatically switching to version " .. eessi_version .. " of the RISC-V development repository " .. eessi_repo .. ".\n" .. + "For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/.") + elseif (eessi_version == "2025.06") then + eessi_repo = "/cvmfs/dev.eessi.io/riscv" + LmodMessage("This EESSI production version only provides a RISC-V compatibility layer,\n" .. + "software installations are provided by the EESSI development repository at " .. eessi_repo .. ".\n") + if not isDir(eessi_repo) then + LmodError("The EESSI development repository dev.eessi.io is not mounted on your system.\n" .. + "This is required for RISC-V systems.") + end + end end local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) local eessi_os_type = "linux" @@ -32,7 +44,7 @@ function eessiDebug(text) end end function archdetect_cpu() - local script = pathJoin(eessi_prefix, 'init', 'lmod_eessi_archdetect_wrapper.sh') + local script = pathJoin(eessi_archdetect_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 @@ -62,7 +74,7 @@ function archdetect_cpu() end end function archdetect_accel() - local script = pathJoin(eessi_prefix, 'init', 'lmod_eessi_archdetect_wrapper_accel.sh') + local script = pathJoin(eessi_archdetect_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 From 001cea1b68c4a815f8dc7c17899f80e22d8b50e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Mon, 8 Sep 2025 09:35:13 +0200 Subject: [PATCH 2/5] set eessi_prefix a bit earlier, override it for RISC-V --- init/modules/EESSI/2023.06.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 14e0e175..0f65500e 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -13,17 +13,21 @@ conflict("EESSI") -- this is a version-agnostic module file, works for EESSI/2023.06, EESSI/2025.06, etc. local eessi_version = myModuleVersion() local eessi_repo = "/cvmfs/software.eessi.io" -local eessi_archdetect_prefix = pathJoin(eessi_repo, "versions", eessi_version, "init") +local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) +local eessi_archdetect_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 if (eessi_version == "2023.06") then eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or "20240402" eessi_repo = "/cvmfs/riscv.eessi.io" + eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) LmodMessage("RISC-V architecture detected, but there is no RISC-V support yet in the production repository.\n" .. "Automatically switching to version " .. eessi_version .. " of the RISC-V development repository " .. eessi_repo .. ".\n" .. "For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/.") elseif (eessi_version == "2025.06") then eessi_repo = "/cvmfs/dev.eessi.io/riscv" + eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) LmodMessage("This EESSI production version only provides a RISC-V compatibility layer,\n" .. "software installations are provided by the EESSI development repository at " .. eessi_repo .. ".\n") if not isDir(eessi_repo) then @@ -32,8 +36,6 @@ if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then end end end -local eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) -local eessi_os_type = "linux" setenv("EESSI_VERSION_DEFAULT", eessi_version) setenv("EESSI_VERSION", eessi_version) setenv("EESSI_CVMFS_REPO", eessi_repo) From a4f9dc99e4ee49b2ce572316ff7821dc6ee69d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Mon, 8 Sep 2025 09:36:24 +0200 Subject: [PATCH 3/5] also check for version 20240402, in case we're loading the module from /cvmfs/riscv.eessi.io --- init/modules/EESSI/2023.06.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 0f65500e..f7403568 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -18,7 +18,7 @@ local eessi_archdetect_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 - if (eessi_version == "2023.06") then + if (eessi_version == "2023.06" or eessi_version == "20240402") then eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or "20240402" eessi_repo = "/cvmfs/riscv.eessi.io" eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) From 07595b9515909b65bff9301c31365c8b85260c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Mon, 8 Sep 2025 09:38:29 +0200 Subject: [PATCH 4/5] allow for overriding eessi_version for RISC-V 2025.06 --- init/modules/EESSI/2023.06.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index f7403568..6026fd2f 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -27,6 +27,7 @@ if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then "For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/.") elseif (eessi_version == "2025.06") then eessi_repo = "/cvmfs/dev.eessi.io/riscv" + eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or eessi_version eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) LmodMessage("This EESSI production version only provides a RISC-V compatibility layer,\n" .. "software installations are provided by the EESSI development repository at " .. eessi_repo .. ".\n") From faa71e0f1f6f56bdec74ad8f0b66af9901a4dbcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Mon, 8 Sep 2025 10:32:42 +0200 Subject: [PATCH 5/5] only print RISC-V messages when loading the module --- init/modules/EESSI/2023.06.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 6026fd2f..46375bf7 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -22,15 +22,19 @@ if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or "20240402" eessi_repo = "/cvmfs/riscv.eessi.io" eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) - LmodMessage("RISC-V architecture detected, but there is no RISC-V support yet in the production repository.\n" .. - "Automatically switching to version " .. eessi_version .. " of the RISC-V development repository " .. eessi_repo .. ".\n" .. - "For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/.") + if mode() == "load" then + LmodMessage("RISC-V architecture detected, but there is no RISC-V support yet in the production repository.\n" .. + "Automatically switching to version " .. eessi_version .. " of the RISC-V development repository " .. eessi_repo .. ".\n" .. + "For more details about this repository, see https://www.eessi.io/docs/repositories/riscv.eessi.io/.") + end elseif (eessi_version == "2025.06") then eessi_repo = "/cvmfs/dev.eessi.io/riscv" eessi_version = os.getenv("EESSI_VERSION_OVERRIDE") or eessi_version eessi_prefix = pathJoin(eessi_repo, "versions", eessi_version) - LmodMessage("This EESSI production version only provides a RISC-V compatibility layer,\n" .. - "software installations are provided by the EESSI development repository at " .. eessi_repo .. ".\n") + if mode() == "load" then + LmodMessage("This EESSI production version only provides a RISC-V compatibility layer,\n" .. + "software installations are provided by the EESSI development repository at " .. eessi_repo .. ".\n") + end if not isDir(eessi_repo) then LmodError("The EESSI development repository dev.eessi.io is not mounted on your system.\n" .. "This is required for RISC-V systems.")