From b81151ad8c03adbc4de023dbb908cacb87e2ff6f Mon Sep 17 00:00:00 2001 From: lara Date: Tue, 17 Sep 2024 13:40:06 +0200 Subject: [PATCH 1/4] {2023.06}[2023a,zen4] LAMMPS 2Aug2023 for zen4 --- .../2023.06/zen4/eessi-2023.06-eb-4.9.3-2023a.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.3-2023a.yml diff --git a/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.3-2023a.yml b/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.3-2023a.yml new file mode 100644 index 0000000000..df3d0dedaa --- /dev/null +++ b/easystacks/software.eessi.io/2023.06/zen4/eessi-2023.06-eb-4.9.3-2023a.yml @@ -0,0 +1,2 @@ +easyconfigs: + - LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb From 0eee4960d05d25f025b510984b572416e421a5d3 Mon Sep 17 00:00:00 2001 From: lara Date: Wed, 18 Sep 2024 09:57:57 +0200 Subject: [PATCH 2/4] add hook for zen4 builds to set --- eb_hooks.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index 3e095129f9..0709389ffb 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -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] @@ -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': + 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'] = '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: @@ -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 = { From eba92ca6c2b292c64fd47e6e5df6cfd97c5e8fdc Mon Sep 17 00:00:00 2001 From: Lara Ramona Peeters <49882639+laraPPr@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:20:36 +0200 Subject: [PATCH 3/4] Set correct kokkos variable --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 0709389ffb..740f5e6cd8 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -528,7 +528,7 @@ def pre_configure_hook_LAMMPS_zen4(self, *args, **kwargs): 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'] = 'ZEN3' + self.cfg['kokkos_arch'] = 'ZEN3' else: raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!") From 54faa34196fe387fe9231677a07d83fc0021af36 Mon Sep 17 00:00:00 2001 From: Lara Ramona Peeters <49882639+laraPPr@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:55:27 +0200 Subject: [PATCH 4/4] fix lammps version in hook --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 740f5e6cd8..b3e457cfe3 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -524,7 +524,7 @@ def pre_configure_hook_LAMMPS_zen4(self, *args, **kwargs): cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') if self.name == 'LAMMPS': - if self.version == '2Aug2023': + 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