Skip to content

Commit

Permalink
Merge pull request #705 from laraPPr/complete_zen4
Browse files Browse the repository at this point in the history
{2023.06}[2023a,zen4] LAMMPS 2Aug2023 for zen4
  • Loading branch information
boegel authored Sep 18, 2024
2 parents b1d00c9 + 54faa34 commit 105d191
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
easyconfigs:
- LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb
20 changes: 20 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
CPU_TARGET_AARCH64_GENERIC = 'aarch64/generic'
CPU_TARGET_A64FX = 'aarch64/a64fx'

CPU_TARGET_ZEN4 = 'x86_64/amd/zen4'

EESSI_RPATH_OVERRIDE_ATTR = 'orig_rpath_override_dirs'

SYSTEM = EASYCONFIG_CONSTANTS['SYSTEM'][0]
Expand Down Expand Up @@ -514,6 +516,23 @@ 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):
"""
pre-configure hook for LAMMPS:
- set kokkos_arch on x86_64/amd/zen4
"""

cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR')
if self.name == 'LAMMPS':
if self.version == '2Aug2023_update2':
if get_cpu_architecture() == X86_64:
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'
else:
raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!")


def pre_test_hook(self,*args, **kwargs):
"""Main pre-test hook: trigger custom functions based on software name."""
if self.name in PRE_TEST_HOOKS:
Expand Down Expand Up @@ -783,6 +802,7 @@ def inject_gpu_property(ec):
'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,
}

PRE_TEST_HOOKS = {
Expand Down

0 comments on commit 105d191

Please sign in to comment.