@@ -449,6 +449,9 @@ def pre_prepare_hook(self, *args, **kwargs):
449449 # Always trigger this, regardless of ec.name
450450 pre_prepare_hook_unsupported_modules (self , * args , ** kwargs )
451451
452+ # Always trigger this, regardless of ec.name
453+ pre_prepare_hook_cuda_dependant (self , * args , ** kwargs )
454+
452455
453456def post_prepare_hook_gcc_prefixed_ld_rpath_wrapper (self , * args , ** kwargs ):
454457 """
@@ -910,6 +913,20 @@ def post_easyblock_hook_copy_easybuild_subdir(self, *args, **kwargs):
910913 copy_dir (app_easybuild_dir , app_reprod_dir )
911914
912915
916+ def pre_prepare_hook_cuda_dependant (self , * args , ** kwargs ):
917+ """
918+ CUDA 12.8.0 doesn't support the 10.0f and 12.0f targets, only 10.0 and 12.0. This hook converts
919+ any CC 10.0f / 12.0f into 10.0 / 12.0 if the current package depends on CUDA.
920+ """
921+
922+ cudaver = get_dependency_software_version ("CUDA" , ec = self .cfg , check_deps = True , check_builddeps = True )
923+ if cudaver and cudaver == '12.8.0' :
924+ cuda_cc = build_option ('cuda_compute_capabilities' )
925+ if cuda_cc and ('10.0f' in cuda_cc or '12.0f' in cuda_cc ):
926+ updated_cuda_cc = [v .replace ('.0f' , '.0' ) if v in ['10.0f' , '12.0f' ] else v for v in cuda_cc ]
927+ update_build_option ('cuda_compute_capabilities' , updated_cuda_cc )
928+
929+
913930def pre_prepare_hook_cudnn (self , * args , ** kwargs ):
914931 """
915932 cuDNN is a binary install, that doesn't always have the device code for the suffixed CUDA
@@ -1110,6 +1127,31 @@ def pre_configure_hook_score_p(self, *args, **kwargs):
11101127 raise EasyBuildError ("Score-P-specific hook triggered for non-Score-P easyconfig?!" )
11111128
11121129
1130+ def pre_configure_hook_dyninst (self , * args , ** kwargs ):
1131+ """
1132+ Pre-configure hook for Dyninst
1133+ - specify correct path to binutils (in compat layer)
1134+ """
1135+ if self .name == 'Dyninst' :
1136+
1137+ # determine path to Prefix installation in compat layer via $EPREFIX
1138+ eprefix = get_eessi_envvar ('EPREFIX' )
1139+
1140+ binutils_lib_path_glob_pattern = os .path .join (eprefix , 'usr' , 'lib*' , 'binutils' , '*-linux-gnu' , '2.*' )
1141+ binutils_lib_path = glob .glob (binutils_lib_path_glob_pattern )
1142+ if len (binutils_lib_path ) == 1 :
1143+ print_msg ("Defining LibIberty variables for Dyninst..." )
1144+ self .cfg .update ('configopts' , '-DLibIberty_ROOT_DIR=' + binutils_lib_path [0 ])
1145+ self .cfg .update ('configopts' , '-DLibIberty_INCLUDE_DIRS=' + os .path .join (binutils_lib_path [0 ], 'include' ))
1146+ self .cfg .update ('configopts' , '-DLibIberty_LIBRARIES=' + os .path .join (binutils_lib_path [0 ], 'libiberty.a' ))
1147+ else :
1148+ raise EasyBuildError ("Failed to isolate path for binutils libraries using %s, got %s" ,
1149+ binutils_lib_path_glob_pattern , binutils_lib_path )
1150+
1151+ else :
1152+ raise EasyBuildError ("Dyninst-specific hook triggered for non-Dyninst easyconfig?!" )
1153+
1154+
11131155def pre_configure_hook_extrae (self , * args , ** kwargs ):
11141156 """
11151157 Pre-configure hook for Extrae
@@ -1987,6 +2029,7 @@ def pre_run_shell_cmd_hook(cmd, work_dir=None, **kwargs):
19872029 'WRF' : pre_configure_hook_wrf_aarch64 ,
19882030 'LAMMPS' : pre_configure_hook_LAMMPS_zen4_and_aarch64_cuda ,
19892031 'Score-P' : pre_configure_hook_score_p ,
2032+ 'Dyninst' : pre_configure_hook_dyninst ,
19902033 'CMake' : pre_configure_hook_cmake_system ,
19912034}
19922035
0 commit comments