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):
if ec.name in 'UCX' and install_path().lower().startswith('/p/software'):
key = "modluafooter"
value = '''
if not ( isloaded("UCX-settings") ) then
load("UCX-settings")
-- This weird construct is to prevent lmod from loading the default settings when reloading/swapping UCX
-- 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
'''
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