@@ -360,16 +360,22 @@ def parse_hook(ec, *args, **kwargs): # pylint: disable=unused-argument
360
360
ec .toolchain .options ['optarch' ] = optarchs_intel [LOCAL_ARCH ]
361
361
ec .log .info (f"[parse hook] Set optarch in parameter toolchainopts: { ec .toolchain .options ['optarch' ]} " )
362
362
363
- # skip installation of CUDA software in non-GPU architectures, only create module file
363
+ ###############################
364
+ # ------ GPU MODULES -------- #
365
+ ###############################
366
+
367
+ # skip installation of CUDA software in non-GPU architectures, only create a dummy module file
364
368
if is_gpu_software (ec ) and LOCAL_ARCH_FULL not in GPU_ARCHS :
365
- # only install the module file in non-GPU nodes
369
+ ec .log .info ("[parse hook] Generating dummy GPU module on non-GPU node" )
370
+ # remove all dependencies to avoid unnecessary module loads on the dummy module
371
+ ec ['dependencies' ] = []
372
+ # inject error message in module file
373
+ ec ['modluafooter' ] = GPU_DUMMY_MOD_FOOTER
366
374
# module_only steps: [MODULE_STEP, PREPARE_STEP, READY_STEP, POSTITER_STEP, SANITYCHECK_STEP]
367
375
ec ['module_only' ] = True
368
376
ec .log .info (f"[parse hook] Set parameter module_only: { ec ['module_only' ]} " )
369
377
ec ['skipsteps' ] = [SANITYCHECK_STEP ]
370
378
ec .log .info (f"[parse hook] Set parameter skipsteps: { ec ['skipsteps' ]} " )
371
- # remove all dependencies to avoid unnecessary module loads on the dummy module
372
- ec ['dependencies' ] = []
373
379
374
380
# set cuda compute capabilities
375
381
elif is_gpu_software (ec ):
@@ -606,14 +612,6 @@ def pre_module_hook(self, *args, **kwargs): # pylint: disable=unused-argument
606
612
else :
607
613
self .cfg ['docurls' ] = [usage_info ['link' ]]
608
614
609
- #################################
610
- # ------ DUMMY MODULES -------- #
611
- #################################
612
-
613
- if is_gpu_software (self .cfg ) and LOCAL_ARCH_FULL not in GPU_ARCHS :
614
- self .log .info ("[pre-module hook] Creating dummy module for CUDA modules on non-GPU nodes" )
615
- self .cfg ['modluafooter' ] = GPU_DUMMY_MOD_FOOTER
616
-
617
615
618
616
def post_build_and_install_loop_hook (ecs_with_res ):
619
617
"""
0 commit comments