Skip to content

Commit edc931c

Browse files
committed
Fix a few bugs
1 parent b66962f commit edc931c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/scripts/verify_eessi_environment.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def check_env_endswith(var1, var2):
4040
expected_eessi_accel_arch = os.getenv("EESSI_ACCELERATOR_TARGET_OVERRIDE", default=None)
4141

4242
# Verify the software and accelerator targets are set correctly
43-
check_env_equals("EESSI_SOFTWARE_SUBDIR_OVERRIDE", "EESSI_SOFTWARE_SUBDIR")
43+
if os.getenv("EESSI_SOFTWARE_SUBDIR_OVERRIDE", default=None):
44+
check_env_equals("EESSI_SOFTWARE_SUBDIR_OVERRIDE", "EESSI_SOFTWARE_SUBDIR")
4445
if expected_eessi_accel_arch:
4546
# EESSI_ACCEL_SUBDIR is what is detected by archdetect (or respects EESSI_ACCELERATOR_TARGET_OVERRIDE)
4647
check_env_equals("EESSI_ACCELERATOR_TARGET_OVERRIDE", "EESSI_ACCEL_SUBDIR")

init/modules/EESSI/2023.06.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,28 +145,31 @@ if not (archdetect_accel == nil or archdetect_accel == '') then
145145
eessiDebug("Checking if " .. eessi_module_path_accel .. " exists")
146146
if not isDir(eessi_module_path_accel) then
147147
-- fall back to major version GPU arch if the exact one is not an option (i.e, 7.5 -> 7.0)
148+
local original_archdetect_accel = archdetect_accel
148149
archdetect_accel = archdetect_accel:sub(1,-2) .. "0"
149-
eessiDebug("No directory for " .. archdetect_accel .. ", trying " .. archdetect_accel)
150+
eessiDebug("No directory for " .. original_archdetect_accel .. ", trying " .. archdetect_accel)
150151
eessi_module_path_accel = pathJoin(eessi_accel_software_path, archdetect_accel, eessi_modules_subdir)
151152
end
152153
if isDir(eessi_module_path_accel) then
153154
-- set the accelerator target based on what actually exists
154155
setenv("EESSI_ACCELERATOR_TARGET", archdetect_accel)
155156
setenv("EESSI_MODULEPATH_ACCEL", eessi_module_path_accel)
156-
prepend_path("MODULEPATH", eessi_module_path_accel)
157-
eessiDebug("Using accelerator modules at: " .. eessi_module_path_accel)
157+
if ( mode() ~= "spider" ) then
158+
prepend_path("MODULEPATH", eessi_module_path_accel)
159+
eessiDebug("Using accelerator modules at: " .. eessi_module_path_accel)
160+
end
158161
end
159162
end
160163

161164
-- prepend the site module path last so it has priority
162165
prepend_path("MODULEPATH", eessi_site_module_path)
166+
eessiDebug("Adding " .. eessi_site_module_path .. " to MODULEPATH")
163167
if isDir(eessi_module_path_accel) then
164168
eessi_module_path_site_accel = string.gsub(eessi_module_path_accel, "versions", "host_injections")
165169
setenv("EESSI_SITE_MODULEPATH_ACCEL", eessi_module_path_site_accel)
166170
prepend_path("MODULEPATH", eessi_module_path_site_accel)
167171
eessiDebug("Using site accelerator modules at: " .. eessi_module_path_site_accel)
168172
end
169-
eessiDebug("Adding " .. eessi_site_module_path .. " to MODULEPATH")
170173
if mode() == "load" then
171174
LmodMessage("EESSI/" .. eessi_version .. " loaded successfully")
172175
end

0 commit comments

Comments
 (0)