Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{2023.06}[2023a,zen4] LAMMPS 2Aug2023 for zen4 #705

Merged
merged 5 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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