From f899b44ef9b941743bc931e2854d1f77a573d979 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 14 Apr 2024 14:33:51 +0200 Subject: [PATCH 1/5] {2023.06}[foss/2023a] LAMMPS v2Aug2023_update2 --- .../pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023a.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023a.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023a.yml index 254e63df6b..2210925189 100644 --- a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023a.yml +++ b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023a.yml @@ -1,2 +1,3 @@ easyconfigs: - BWA-0.7.17-20220923-GCCcore-12.3.0.eb + - LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb From 774be6ec7e9e3a59aacbb470e6dbcf0f6f39f987 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 14 Apr 2024 18:00:26 +0200 Subject: [PATCH 2/5] add from-pr options --- .../2023.06/eessi-2023.06-eb-4.9.1-2023a.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023a.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023a.yml index 2210925189..0d13310d2d 100644 --- a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023a.yml +++ b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023a.yml @@ -1,3 +1,8 @@ easyconfigs: - BWA-0.7.17-20220923-GCCcore-12.3.0.eb - - LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb + - LAMMPS-2Aug2023_update2-foss-2023a-kokkos.eb: + # see https://github.com/easybuilders/easybuild-easyconfigs/pull/19471 + # see https://github.com/easybuilders/easybuild-easyblocks/pull/3036 + options: + from-pr: 19471 + include-easyblocks-from-pr: 3036 From e98283a9dd327f46ee29e05cb7018d395bb9bb59 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 14 Apr 2024 20:43:46 +0200 Subject: [PATCH 3/5] set kokkos_arch when building lammps for aarch64/generic --- eb_hooks.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index 144fb687c5..44d480a8bd 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -308,6 +308,15 @@ def parse_hook_lammps_remove_deps_for_CI_aarch64(ec, *args, **kwargs): # we need this hook because we check for missing installations for all CPU targets # on an x86_64 VM in GitHub Actions (so condition based on ARCH in LAMMPS easyconfig is always true) ec['dependencies'] = [dep for dep in ec['dependencies'] if dep[0] not in ('ScaFaCoS', 'tbb')] + # if the optarch is GENERIC we also set 'kokkos_arch' to 'ARMV80' (if not set the easyblock will + # run "python -c 'from archspec.cpu import host; print(host())'" + # which returns the host architecture which is then mapped to some + # identifier corresponding to the architecture; however, this may not + # be correct if we want to build for `aarch64/generic` + if build_option('optarch') == OPTARCH_GENERIC: + ec['kokkos_arch'] = 'ARMV80' + print_msg("Set kokkos_arch = 'ARMV80' (cpu family: %s, optarch: %s", + os.geten('EESSI_CPU_FAMILY'), build_option('optarch')) else: raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!") From f905e3de1eec4d374450cf1c37bdd49238be6b27 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 14 Apr 2024 20:52:49 +0200 Subject: [PATCH 4/5] fix small bug --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 44d480a8bd..f6af93d6f0 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -316,7 +316,7 @@ def parse_hook_lammps_remove_deps_for_CI_aarch64(ec, *args, **kwargs): if build_option('optarch') == OPTARCH_GENERIC: ec['kokkos_arch'] = 'ARMV80' print_msg("Set kokkos_arch = 'ARMV80' (cpu family: %s, optarch: %s", - os.geten('EESSI_CPU_FAMILY'), build_option('optarch')) + os.getenv('EESSI_CPU_FAMILY'), build_option('optarch')) else: raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!") From a981431462064b3dac32dedb94bc14c51f4d080f Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Sun, 14 Apr 2024 21:02:38 +0200 Subject: [PATCH 5/5] polish addition to parse_hook for LAMMPS --- eb_hooks.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index f6af93d6f0..2d402e4baf 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -308,14 +308,16 @@ def parse_hook_lammps_remove_deps_for_CI_aarch64(ec, *args, **kwargs): # we need this hook because we check for missing installations for all CPU targets # on an x86_64 VM in GitHub Actions (so condition based on ARCH in LAMMPS easyconfig is always true) ec['dependencies'] = [dep for dep in ec['dependencies'] if dep[0] not in ('ScaFaCoS', 'tbb')] - # if the optarch is GENERIC we also set 'kokkos_arch' to 'ARMV80' (if not set the easyblock will - # run "python -c 'from archspec.cpu import host; print(host())'" - # which returns the host architecture which is then mapped to some - # identifier corresponding to the architecture; however, this may not - # be correct if we want to build for `aarch64/generic` + # if optarch is GENERIC, we also set 'kokkos_arch' to 'ARMV80' + # if not set the easyblock will run + # "python -c 'from archspec.cpu import host; print(host())'" + # which returns the host architecture which is then mapped to some + # identifier corresponding to the architecture; + # however, this may not be correct if we want to build for + # `aarch64/generic` if build_option('optarch') == OPTARCH_GENERIC: ec['kokkos_arch'] = 'ARMV80' - print_msg("Set kokkos_arch = 'ARMV80' (cpu family: %s, optarch: %s", + print_msg("Set kokkos_arch = 'ARMV80' (cpu family: %s, optarch: %s)", os.getenv('EESSI_CPU_FAMILY'), build_option('optarch')) else: raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!")