From e9b55f5b3727b426c58e1b52a66a4150553950ed Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 23 May 2024 10:05:15 +0200 Subject: [PATCH] don't check for GPU driver libs when building --- create_lmodsitepackage.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/create_lmodsitepackage.py b/create_lmodsitepackage.py index d6137eb901..20c4098b8f 100755 --- a/create_lmodsitepackage.py +++ b/create_lmodsitepackage.py @@ -133,8 +133,9 @@ end -- when loading CUDA (and cu*) enabled modules check if the necessary driver libraries are accessible to the NESSI linker, -- otherwise, refuse to load the requested module and print error message - local haveGpu = mt:haveProperty(simpleName,"arch","gpu") - if haveGpu then + local checkGpu = mt:haveProperty(simpleName,"arch","gpu") + local overrideGpuCheck = os.getenv("EESSI_OVERRIDE_GPU_CHECK") + if checkGpu and (overrideGpuCheck == nil) then local arch = os.getenv("EESSI_CPU_FAMILY") or "" local cvmfs_repo = os.getenv("EESSI_CVMFS_REPO") or "" local cudaVersionFile = cvmfs_repo .. "/host_injections/nvidia/" .. arch .. "/latest/cuda_version.txt" @@ -144,7 +145,9 @@ if not (cudaDriverExists or singularityCudaExists) then local advice = "which relies on the CUDA runtime environment and driver libraries. " advice = advice .. "In order to be able to use the module, you will need " - advice = advice .. "to make sure NESSI can find the GPU driver libraries on your host system.\\n" + advice = advice .. "to make sure NESSI can find the GPU driver libraries on your host system. You can " + advice = advice .. "override this check by setting the environment variable EESSI_OVERRIDE_GPU_CHECK but " + advice = advice .. "the loaded application will not be able to execute on your system.\\n" advice = advice .. refer_to_docs LmodError("\\nYou requested to load ", simpleName, " ", advice) else