@@ -360,16 +360,22 @@ def parse_hook(ec, *args, **kwargs): # pylint: disable=unused-argument
360360 ec .toolchain .options ['optarch' ] = optarchs_intel [LOCAL_ARCH ]
361361 ec .log .info (f"[parse hook] Set optarch in parameter toolchainopts: { ec .toolchain .options ['optarch' ]} " )
362362
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
364368 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
366374 # module_only steps: [MODULE_STEP, PREPARE_STEP, READY_STEP, POSTITER_STEP, SANITYCHECK_STEP]
367375 ec ['module_only' ] = True
368376 ec .log .info (f"[parse hook] Set parameter module_only: { ec ['module_only' ]} " )
369377 ec ['skipsteps' ] = [SANITYCHECK_STEP ]
370378 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' ] = []
373379
374380 # set cuda compute capabilities
375381 elif is_gpu_software (ec ):
@@ -606,14 +612,6 @@ def pre_module_hook(self, *args, **kwargs): # pylint: disable=unused-argument
606612 else :
607613 self .cfg ['docurls' ] = [usage_info ['link' ]]
608614
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-
617615
618616def post_build_and_install_loop_hook (ecs_with_res ):
619617 """
0 commit comments