Getting Started with Secret App LAMMPS for ISC25 SCC (In-Person)
Large-scale Atomic/Molecular Massively Parallel Simulator (LAMMPS) is a classical molecular dynamics code. LAMMPS has potentials for solid-state materials (metals, semiconductors) and soft matter (biomolecules, polymers) and coarse-grained or mesoscopic systems. It can be used to model atoms or, more generically, as a parallel particle simulator at the atomic, meso, or continuum scale. LAMMPS runs on single processors or in parallel using message-passing techniques and a spatial-decomposition of the simulation domain. LAMMPS is distributed as an open source code under the terms of the GPL. More information on LAMMPS can be found at the LAMMPS web site: http://lammps.sandia.gov.
Introduction to LAMMPS
LAMMPS is a classical molecular dynamics code with a focus on materials modeling. It's an acronym for Large-scale Atomic/Molecular Massively Parallel Simulator.
LAMMPS has potentials for solid-state materials (metals, semiconductors) and soft matter (biomolecules, polymers) and coarse-grained or mesoscopic systems. It can be used to model atoms or, more generically, as a parallel particle simulator at the atomic, meso, or continuum scale.
Build LAMMPS for x86_64 CPUs
This is an example that uses HPC-X MPI.
Load the relevant modules
module load intel/2023.2
module load compiler mkl
module load hpcx-2.22.12. Make
# Download latest stable version from https://lammps.sandia.gov/download.html.
tar xf lammps-stable.tar.gz
cd lammps-29Aug2024/src
make clean-all
make no-all
make no-lib
make yes-intel yes-kspace yes-molecule yes-rigid yes-manybody
make -j 32 intel_cpu_openmpiRun example
mpirun -np 128 lammps/lmp_intel_cpu_openmpi -in <input> -pk intel 0 omp 1 -sf intelBuild LAMMPS for ARM CPUs
This is an example that uses nvhpc on Nvidia Grace CPU.
Download and install nvhpc for ARM from https://developer.nvidia.com/hpc-sdk-downloads.
Load the relevant modules
module use <path to nvhpc-25.3>/modulefiles
module load nvhpc-hpcx/25.3Make
# Download latest stable version from https://lammps.sandia.gov/download.html.
tar xf lammps-stable.tar.gz
cd lammps-29Aug2024/src
cd MAKE/OPTIONS
cp Makefile.g++_openmpi Makefile.arm
# Makefile.arm as needed
cd ../..
make clean-all
make no-all
make no-lib
make yes-kspace yes-molecule yes-rigid yes-manybody
make -j 32 armRun example
mpirun -np 128 lammps/lmp_arm -in <input>
Output example
...
Precision: mixed
----------------------------------------------------------
Neighbor list info ...
update: every = 1 steps, delay = 5 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 4.2
ghost atom cutoff = 4.2
binsize = 2.1, bins = 828 828 1656
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair tersoff/intel, perpetual
attributes: full, newton on, intel
pair build: full/bin/intel
stencil: full/bin/3d/intel
bin: intel
Setting up Verlet run ...
Unit style : metal
Current step : 0
Time step : 0.001
Per MPI rank memory allocation (min/avg/max) = 2.016e+04 | 2.025e+04 | 2.027e+04 Mbytes
Step Temp E_pair E_mol TotEng Press
0 1000 -2.427669e+09 0 -2.3598995e+09 7019.8698
100 428.29904 -2.3888869e+09 0 -2.3598612e+09 -14372.049
200 543.33687 -2.3966807e+09 0 -2.359859e+09 -1846.3798
300 493.20805 -2.3932791e+09 0 -2.3598547e+09 -3963.2901
400 496.80952 -2.3935222e+09 0 -2.3598537e+09 -2873.4339
500 483.83489 -2.3926424e+09 0 -2.3598531e+09 -2995.8522
600 469.52456 -2.3916726e+09 0 -2.3598531e+09 -4801.5372
Loop time of 1259.88 on 224 procs for 600 steps with 524288000 atoms
Performance: 0.041 ns/day, 583.276 hours/ns, 0.476 timesteps/s, 249.685 Matom-step/s
99.5% CPU use with 224 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 1046 | 1050.7 | 1056.9 | 6.9 | 83.40
Neigh | 24.737 | 24.911 | 25.547 | 2.7 | 1.98
Comm | 42.334 | 46.967 | 58.881 | 45.4 | 3.73
Output | 0.14938 | 0.1639 | 0.21684 | 2.3 | 0.01
Modify | 94.349 | 102.09 | 104.56 | 19.4 | 8.10
Other | | 35.04 | | | 2.78
Nlocal: 2.34057e+06 ave 2.34273e+06 max 2.33676e+06 min
Histogram: 11 49 4 0 0 0 26 38 12 84
Nghost: 179410 ave 183845 max 176690 min
Histogram: 96 0 45 19 0 0 0 0 0 64
Neighs: 0 ave 0 max 0 min
Histogram: 224 0 0 0 0 0 0 0 0 0
FullNghs: 3.85404e+07 ave 3.85804e+07 max 3.84722e+07 min
Histogram: 3 48 12 1 0 0 43 21 52 44
Total # of neighbors = 8.6330451e+09
Ave neighs/atom = 16.466227
Neighbor list builds = 26
Dangerous builds = 0
For GPUs
https://docs.lammps.org/Speed_gpu.html
Tasks and Submissions
Run LAMMPS with .
Submit the standard output