@@ -1058,6 +1058,27 @@ def pre_prepare_hook_pytorch(self, *args, **kwargs):
10581058 raise EasyBuildError ("PyTorch-specific hook triggered for non-PyTorch easyconfig?!" )
10591059
10601060
1061+ def pre_prepare_hook_LAMMPS_kokkos_CUDA_families (self , * args , ** kwargs ):
1062+ """
1063+ Kokkos does not have support building for GPU families.
1064+ This cause problems for EasyBuild cuda sanity check for CUDA Compute Capalities such as 9.0a, 10.0f, 12.0f etc.
1065+ This hook strips the suffixes when building LAMMPS with kokkos.
1066+ """
1067+ if self .name == 'LAMMPS' :
1068+ if self .version in ['22Jul2025' ]:
1069+ if self .cfg ['kokkos' ]:
1070+ cuda_cc = build_option ('cuda_compute_capabilities' )
1071+ if cuda_cc and '9.0a' in cuda_cc :
1072+ updated_cuda_cc = [v .replace ('9.0a' , '9.0' ) for v in cuda_cc ]
1073+ update_build_option ('cuda_compute_capabilities' , updated_cuda_cc )
1074+ elif cuda_cc and '10.0f' in cuda_cc :
1075+ updated_cuda_cc = [v .replace ('10.0f' , '10.0' ) for v in cuda_cc ]
1076+ update_build_option ('cuda_compute_capabilities' , updated_cuda_cc )
1077+ elif cuda_cc and '12.0f' in cuda_cc :
1078+ updated_cuda_cc = [v .replace ('12.0f' , '12.0' ) for v in cuda_cc ]
1079+ update_build_option ('cuda_compute_capabilities' , updated_cuda_cc )
1080+
1081+
10611082def post_prepare_hook_llvm_a64fx (self , * args , ** kwargs ):
10621083 """
10631084 Post-prepare hook for LLVM 14 and 15 on A64FX to reset optarch build option.
@@ -2076,6 +2097,7 @@ def post_easyblock_hook(self, *args, **kwargs):
20762097PRE_PREPARE_HOOKS = {
20772098 'cuDNN' : pre_prepare_hook_cudnn ,
20782099 'Highway' : pre_prepare_hook_highway_handle_test_compilation_issues ,
2100+ 'LAMMPS' : pre_prepare_hook_LAMMPS_kokkos_CUDA_families ,
20792101 'LLVM' : pre_prepare_hook_llvm_a64fx ,
20802102 'PyTorch' : pre_prepare_hook_pytorch ,
20812103 'Rust' : pre_prepare_hook_llvm_a64fx ,
0 commit comments