Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
81859fa
Upadate LAMMPS pre-configure hook to disable SIMD for ARM + CUDA
laraPPr Sep 23, 2025
fa18458
remove trailing whitespaces
laraPPr Sep 23, 2025
f4b0dc5
Test LAMMMSP hook
laraPPr Sep 23, 2025
c0a3f2d
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 23, 2025
22db16b
fix python syntax
laraPPr Sep 23, 2025
0d31912
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 23, 2025
821a181
fix variable in eb_hooks
laraPPr Sep 24, 2025
5ebabcc
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 24, 2025
a0dfa48
Merge branch 'main' into LAMMPS_hook
laraPPr Sep 24, 2025
9704bae
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 24, 2025
ba2b4c1
newer archspec is used so need to set kokkos_arch for nvidia grace
laraPPr Sep 24, 2025
f10c5ad
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 24, 2025
a6452f8
fix LAMMPS pre-configure hook
laraPPr Sep 24, 2025
9bd9e9a
fix style
laraPPr Sep 24, 2025
5ad69ca
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 24, 2025
d935d9c
fall back to ARMV7 for LAMMPS build with CUDA
laraPPr Sep 24, 2025
aad45d0
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 24, 2025
6563669
fall back to ARMV7 for all LAMMPS build with CUDA on ARM
laraPPr Sep 24, 2025
8c78f2f
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 24, 2025
838f363
Try to set NATIVE instead of ARMV7
laraPPr Sep 24, 2025
3963f1b
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 24, 2025
a31d4aa
use older instructions of generic to turn of simd
laraPPr Sep 24, 2025
6ef483c
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 24, 2025
a119733
resolve failed configuration generic
laraPPr Sep 24, 2025
35c8959
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 24, 2025
6d14576
Try native instead of ARMV70
laraPPr Sep 25, 2025
9da0d64
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 25, 2025
c2911b8
go back to ARMV70
laraPPr Sep 25, 2025
d1d2bb9
Merge branch 'LAMMPS_hook' into test_LAMMPS_HOOK
laraPPr Sep 25, 2025
daa99db
add easyblock to overide kokkos_arch for aarch64/generic
laraPPr Sep 25, 2025
cd3463e
fix syntax in yml file
laraPPr Sep 25, 2025
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,6 @@
# DO NOT MERGE
# this is solely for testing the new hook on ARM + CUDA targets
easyconfigs:
- LAMMPS-2Aug2023_update2-foss-2023a-kokkos-CUDA-12.1.1.eb:
options:
include-easyblocks-from-commit: 338c31724aa3dc58223ec35120d4c18d1bdf8d94
36 changes: 33 additions & 3 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,19 +1003,49 @@ 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):
def pre_configure_hook_LAMMPS_zen4_and_aarch64_cuda(self, *args, **kwargs):
"""
pre-configure hook for LAMMPS:
- set kokkos_arch on x86_64/amd/zen4
- set kokkos_arch on x86_64/amd/zen4 and aarch64/nvidia/grace
- Disable SIMD for Aarch64 + cuda builds
"""

# Get cpu_target for zen4 hook
cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR')

# Get the dependencies to check CUDA
deps = self.cfg.dependencies()
cuda_versions = ('12.1.1')

if self.name == 'LAMMPS':

# Set kokkos_arch for LAMMPS version which do not have support for versions that do not support ZEN4
if self.version in ('2Aug2023_update2', '2Aug2023_update4', '29Aug2024'):
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'
elif get_cpu_architecture() == AARCH64:
if cpu_target == CPU_TARGET_NVIDIA_GRACE:
# There is no support for NVIDA grace in LAMMPS yet so falling back to ARMV81
self.cfg['kokkos_arch'] = 'ARMV81'
# To disable simd kokkos_arch need to be set to ARMV7
if self.cuda:
self.cfg['kokkos_arch'] = 'ARMV70'

# Disable SIMD for specific CUDA versions
if self.version == '2Aug2023_update2':
if get_cpu_architecture() == AARCH64:
if ('CUDA' in [dep['name'] for dep in deps]):
for dep in deps:
if 'CUDA' == dep['name']:
if dep['version'] in cuda_versions:
cxxflags = os.getenv('CXXFLAGS', '')
cxxflags = cxxflags.replace('-mcpu=native', '')
cxxflags += ' -march=armv8-a+nosimd'
self.log.info("Setting CXXFLAGS to disable NEON: %s", cxxflags)
env.setvar('CXXFLAGS', cxxflags)

else:
raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!")

Expand Down Expand Up @@ -1579,7 +1609,7 @@ def post_easyblock_hook(self, *args, **kwargs):
'PMIx': pre_configure_hook_pmix_ipv6,
'PRRTE': pre_configure_hook_prrte_ipv6,
'WRF': pre_configure_hook_wrf_aarch64,
'LAMMPS': pre_configure_hook_LAMMPS_zen4,
'LAMMPS': pre_configure_hook_LAMMPS_zen4_and_aarch64_cuda,
'Score-P': pre_configure_hook_score_p,
'VSEARCH': pre_configure_hook_vsearch,
'CMake': pre_configure_hook_cmake_system,
Expand Down
Loading