Skip to content

Commit 105d191

Browse files
authored
Merge pull request #705 from laraPPr/complete_zen4
{2023.06}[2023a,zen4] LAMMPS 2Aug2023 for zen4
2 parents b1d00c9 + 54faa34 commit 105d191

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
easyconfigs:
2+
- LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb

eb_hooks.py

+20
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
CPU_TARGET_AARCH64_GENERIC = 'aarch64/generic'
2727
CPU_TARGET_A64FX = 'aarch64/a64fx'
2828

29+
CPU_TARGET_ZEN4 = 'x86_64/amd/zen4'
30+
2931
EESSI_RPATH_OVERRIDE_ATTR = 'orig_rpath_override_dirs'
3032

3133
SYSTEM = EASYCONFIG_CONSTANTS['SYSTEM'][0]
@@ -514,6 +516,23 @@ def pre_configure_hook_wrf_aarch64(self, *args, **kwargs):
514516
raise EasyBuildError("WRF-specific hook triggered for non-WRF easyconfig?!")
515517

516518

519+
def pre_configure_hook_LAMMPS_zen4(self, *args, **kwargs):
520+
"""
521+
pre-configure hook for LAMMPS:
522+
- set kokkos_arch on x86_64/amd/zen4
523+
"""
524+
525+
cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR')
526+
if self.name == 'LAMMPS':
527+
if self.version == '2Aug2023_update2':
528+
if get_cpu_architecture() == X86_64:
529+
if cpu_target == CPU_TARGET_ZEN4:
530+
# There is no support for ZEN4 in LAMMPS yet so falling back to ZEN3
531+
self.cfg['kokkos_arch'] = 'ZEN3'
532+
else:
533+
raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!")
534+
535+
517536
def pre_test_hook(self,*args, **kwargs):
518537
"""Main pre-test hook: trigger custom functions based on software name."""
519538
if self.name in PRE_TEST_HOOKS:
@@ -783,6 +802,7 @@ def inject_gpu_property(ec):
783802
'MetaBAT': pre_configure_hook_metabat_filtered_zlib_dep,
784803
'OpenBLAS': pre_configure_hook_openblas_optarch_generic,
785804
'WRF': pre_configure_hook_wrf_aarch64,
805+
'LAMMPS': pre_configure_hook_LAMMPS_zen4,
786806
}
787807

788808
PRE_TEST_HOOKS = {

0 commit comments

Comments
 (0)