-
Notifications
You must be signed in to change notification settings - Fork 301
Update LAMMPS easyblock: v2025 fix + extra tests #3894
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
base: develop
Are you sure you want to change the base?
Conversation
The Python interface was updated in the latest LAMMPS release. `l.finalize()` causes a crash. We can safely remove it, assuming that `mpi4py` is used as dependency.
Add some example scripts to test running LAMMPS with accelerated styles: KOKKOS, GPU, INTEL, OPENMP See easybuilders#3785
Kokkos serial backend can also be built next to OpenMP/CUDA backend. This avoids performance-related warnings when using Kokkos with a single thread.
Co-authored-by: laraPPr <[email protected]> Closes easybuilders#3785 Supersedes easybuilders#3789
60923b4
to
e164235
Compare
|
||
# https://lammps.sandia.gov/doc/Build_extras.html | ||
# KOKKOS | ||
# detect the CPU and GPU architecture (used for Intel and Kokkos packages belos) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# detect the CPU and GPU architecture (used for Intel and Kokkos packages belos) | |
# detect the CPU and GPU architecture (used for Intel and Kokkos packages below) |
os.path.join(self.installdir, "examples", "msst", "in.msst") | ||
) | ||
if self.cfg['kokkos']: # KOKKOS package | ||
if self.cuda: # NOTE: requires a GPU to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a difficult requirement to meet, we should be able to support a cross-compilation. In EESSI, for example, this is going to cause problems as we must cross-compile for a lot of architectures. You could make it conditional on the nvidia-smi
command running successfully?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See for example
easybuild-easyblocks/easybuild/easyblocks/t/tensorflow.py
Lines 1048 to 1054 in 6a0f356
if not which('nvidia-smi', on_error=IGNORE): | |
print_warning('Could not find nvidia-smi. Assuming a system without GPUs and skipping GPU tests!') | |
num_gpus_to_use = 0 | |
elif os.environ.get('CUDA_VISIBLE_DEVICES') == '-1': | |
print_warning('GPUs explicitely disabled via CUDA_VISIBLE_DEVICES. Skipping GPU tests!') | |
num_gpus_to_use = 0 | |
else: |
A few improvements to the LAMMPS Easyblock.
Sanity checks & tests
fix to execute sanity-check Python run on LAMMPS v2025+.
mpi4py
to be installed:{chem}[foss/2024a] LAMMPS v22Jul2025 w/ kokkos, kokkos CUDA 12.6.0 + unit tests easybuild-easyconfigs#23719
Add test runs for accelerator packages (KOKKOS, GPU, INTEL, OPENMP)
Run LAMMPS test runs on multiple cores (<=4) if possible
Enable LAMMPS unit tests (for version >=
29Aug2024_version2
)29Aug2024_version2
{chem}[foss/2024a] LAMMPS v22Jul2025 w/ kokkos, kokkos CUDA 12.6.0 + unit tests easybuild-easyconfigs#23719
other fixes
Closes #3785
Supersedes #3789