Skip to content

Commit

Permalink
Let Lmod handle most of the CRs
Browse files Browse the repository at this point in the history
  • Loading branch information
ocaisa committed Nov 30, 2023
1 parent b5e4090 commit 213baa6
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions create_lmodrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
local cudaEasyBuildDir = hostInjections .. "/software/" .. t.modFullName .. "/easybuild"
local cudaDirExists = isDir(cudaEasyBuildDir)
if not cudaDirExists then
local advice = "While the module file exists, the actual software is not shipped with EESSI.\\n"
advice = advice .. "In order to be able to use the CUDA module, please follow the instructions \\n"
advice = advice .. "available under https://www.eessi.io/docs/gpu/\\n"
LmodError("\\nYou requested to load ", simpleName, "\\n", advice)
local advice = "While the module file exists, the actual software is not shipped with EESSI. "
advice = advice .. "In order to be able to use the CUDA module, please follow the instructions "
advice = advice .. "available under https://www.eessi.io/docs/gpu/"
LmodError("\\nYou requested to load ", simpleName, " ", advice)
end
end
-- when loading CUDA enabled modules check if the necessary driver libraries are accessible to the EESSI linker,
Expand All @@ -59,10 +59,10 @@
local cudaDriverExists = isFile(cudaDriverFile)
local singularityCudaExists = isFile("/.singularity.d/libs/libcuda.so")
if not (cudaDriverExists or singularityCudaExists) then
local advice = "which relies on the CUDA runtime environment and driver libraries.\\n"
advice = advice .. "In order to be able to use the module, please follow the instructions\\n"
advice = advice .. "available under https://www.eessi.io/docs/gpu/\\n"
LmodError("\\nYou requested to load ", simpleName, "\\n", advice)
local advice = "which relies on the CUDA runtime environment and driver libraries. "
advice = advice .. "In order to be able to use the module, please follow the instructions "
advice = advice .. "available under https://www.eessi.io/docs/gpu/"
LmodError("\\nYou requested to load ", simpleName, " ", advice)
else
-- CUDA driver exists, now we check its version to see if an update is needed
if cudaDriverExists then
Expand All @@ -80,10 +80,10 @@
end
end
if driver_libs_need_update == true then
local advice = "but the module you want to load requires CUDA " .. cudaVersion_req .. ".\\n"
advice = advice .. "Please update your CUDA driver libraries and then follow the instructions \\n"
advice = advice .. "under https://www.eessi.io/docs/gpu/ to let EESSI know about the update.\\n"
LmodError("\\nYour driver CUDA version is ", cudaVersion, "\\n", advice)
local advice = "but the module you want to load requires CUDA " .. cudaVersion_req .. ". "
advice = advice .. "Please update your CUDA driver libraries and then follow the instructions "
advice = advice .. "under https://www.eessi.io/docs/gpu/ to let EESSI know about the update."
LmodError("\\nYour driver CUDA version is ", cudaVersion, " ", advice)
end
end
end
Expand Down

0 comments on commit 213baa6

Please sign in to comment.