Skip to content
Snippets Groups Projects
Commit a91ae195 authored by Damian Alvarez's avatar Damian Alvarez
Browse files

To make the UCX module a bit smarter, and try to keep CUDA settings if they were selected before

parent 85966bbf
No related branches found
No related tags found
No related merge requests found
...@@ -404,8 +404,15 @@ def inject_ucx_tweaks(ec): ...@@ -404,8 +404,15 @@ def inject_ucx_tweaks(ec):
if ec.name in 'UCX' and install_path().lower().startswith('/p/software'): if ec.name in 'UCX' and install_path().lower().startswith('/p/software'):
key = "modluafooter" key = "modluafooter"
value = ''' value = '''
if not ( isloaded("UCX-settings") ) then -- This weird construct is to prevent lmod from loading the default settings when reloading/swapping UCX
load("UCX-settings") -- Unfortunately we can't do better (like preserving the UCX transport for CUDA, since the loaded
-- UCX-settings module is lost during the reload
if mode()=="load" then
if isloaded("mpi-settings/CUDA") then
try_load("UCX-settings/RC-CUDA")
else
try_load("UCX-settings")
end
end end
''' '''
if key in ec_dict: if key in ec_dict:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment