From 6c6440936fadeefa6d7ae39982154c0e93914c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 28 Jan 2025 19:35:50 +0100 Subject: [PATCH] set kokkos_arch to SPR for Sapphire Rapids --- eb_hooks.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 9f3793a0db..7bf759e453 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -721,10 +721,10 @@ def pre_configure_hook_wrf_aarch64(self, *args, **kwargs): raise EasyBuildError("WRF-specific hook triggered for non-WRF easyconfig?!") -def pre_configure_hook_LAMMPS_zen4(self, *args, **kwargs): +def pre_configure_hook_LAMMPS_kokkos_arch(self, *args, **kwargs): """ pre-configure hook for LAMMPS: - - set kokkos_arch on x86_64/amd/zen4 + - set kokkos_arch on x86_64/amd/zen4 and x86_64/intel_icelake """ cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') @@ -734,6 +734,10 @@ def pre_configure_hook_LAMMPS_zen4(self, *args, **kwargs): if cpu_target == CPU_TARGET_ZEN4: # There is no support for ZEN4 in LAMMPS yet so falling back to ZEN3 self.cfg['kokkos_arch'] = 'ZEN3' + if cpu_target == CPU_TARGET_SAPPHIRE_RAPIDS: + # These version do support Sapphire Rapids, but the easyblock does not contain the mapping yet + # (and for 2023, the archspec version does not detect it correctly) + self.cfg['kokkos_arch'] = 'SPR' else: raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!") @@ -1151,7 +1155,7 @@ def post_module_hook(self, *args, **kwargs): 'MetaBAT': pre_configure_hook_metabat_filtered_zlib_dep, 'OpenBLAS': pre_configure_hook_openblas_optarch_generic, 'WRF': pre_configure_hook_wrf_aarch64, - 'LAMMPS': pre_configure_hook_LAMMPS_zen4, + 'LAMMPS': pre_configure_hook_LAMMPS_kokkos_arch, 'Score-P': pre_configure_hook_score_p, }