Skip to content

Commit

Permalink
set kokkos_arch to SPR for Sapphire Rapids
Browse files Browse the repository at this point in the history
  • Loading branch information
bedroge committed Jan 28, 2025
1 parent 6aef77f commit 6c64409
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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?!")

Expand Down Expand Up @@ -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,
}

Expand Down

0 comments on commit 6c64409

Please sign in to comment.