Skip to content

Commit 1235f33

Browse files
updates
1 parent 2f3b5c5 commit 1235f33

File tree

1 file changed

+37
-30
lines changed

1 file changed

+37
-30
lines changed

docs/software/sciapps/lammps.md

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,76 @@
11
[](){#ref-uenv-lammps}
22
# LAMMPS
33

4-
[LAMMPS](https://www.lammps.org/) is a classical molecular dynamics code that models an ensemble of particles in a liquid, solid, or gaseous state. It can model atomic, polymeric, biological, metallic, granular, and coarse-grained systems using a variety of force fields and boundary conditions. The current version of LAMMPS is written in C++.
4+
[LAMMPS] is a classical molecular dynamics code that models an ensemble of particles in a liquid, solid, or gaseous state.
5+
It can model atomic, polymeric, biological, metallic, granular, and coarse-grained systems using a variety of force fields and boundary conditions.
6+
The current version of LAMMPS is written in C++.
57

68
## Licensing Terms and Conditions
79

8-
[LAMMPS] is a freely-available open-source code, distributed under the terms of the [GNU Public License](http://www.gnu.org/copyleft/gpl.html).
10+
LAMMPS is a freely-available open-source code, distributed under the terms of the [GNU Public License].
911

1012
## Running LAMMPS
1113

1214
### Loading LAMMPS Interactively
1315

14-
On Alps, [LAMMPS] is precompiled and available in a user environment (uenv). LAMMPS has been built with kokkos, and the GPU package separately.
16+
On Alps, LAMMPS is precompiled and available in a user environment [uenv].
17+
LAMMPS has been built with kokkos, and the GPU package separately.
1518

1619
To find which LAMMPS uenv is provided, you can use the following command:
1720

1821
```
1922
uenv image find lammps
20-
└── uenv image find lammps
21-
uenv/version:tag uarch date id size
22-
lammps/2024:v1 gh200 daint 3483b476b75a1801 3,713 2024-06-03
23-
lammps/2024:v2-rc1 gh200 daint fc5aafe8f327553c 3,625 2025-02-05
2423
```
2524

26-
We recommend using `lammps/2024:v2-rc1` as it's the latest build. To obtain this image, please run:
25+
which will list several uenv lammps uenv images.
26+
We recommend that you regularly check for the latest version.
27+
Please see the documentation here for further details: https://eth-cscs.github.io/cscs-docs/software/uenv/#finding-uenv.
2728

28-
```
29-
uenv image pull lammps/2024:v2-rc1
29+
To obtain this image, please run:
30+
31+
```bash
32+
uenv image pull lammps/2024:v2
3033
```
3134

3235
To start the uenv for this specific version of LAMMPS, you can use:
3336

34-
```
35-
uenv start --view kokkos lammps/2024:v2-rc1
37+
```bash
38+
uenv start --view kokkos lammps/2024:v2
3639
```
3740

3841
You can load the `view` from the uenv which contains the `lmp` executable. The executable in both these views support GPUs:
3942

40-
```
43+
```bash
4144
#lammps +kokkos packae
42-
uenv start --view kokkos lammps/2024:v2-rc1
45+
uenv start --view kokkos lammps/2024:v2
4346
#lammps +gpu package, kokkos disabled
44-
uenv start --view gpu lammps/2024:v2-rc1
47+
uenv start --view gpu lammps/2024:v2
4548
```
4649

4750
A development view is also provided, which contains all libraries and command-line tools necessary to build LAMMPS from source, without including the LAMMPS executable:
4851

49-
```
50-
#build environment for lammps +kokkos package, without providing lmp executeable
51-
uenv start --view develop-kokkos lammps/2024:v2-rc1
52-
#build environment for lammps +gpu package, without providing lmp executeable
53-
uenv start --view develop-gpu lammps/2024:v2-rc1
52+
```bash
53+
# build environment for lammps +kokkos package, without providing lmp executable
54+
uenv start --view develop-kokkos lammps/2024:v2
55+
# build environment for lammps +gpu package, without providing lmp executable
56+
uenv start --view develop-gpu lammps/2024:v2
5457
```
5558

5659
### Running LAMMPS+kokkos on the HPC Platform
5760

58-
To start a job, two bash scripts are potentially required: a [slurm] submission script, and a wrapper for numacontrol which sets up cpu and memory binding:
61+
To start a job, two bash scripts are potentially required: a [SLURM] submission script, and a wrapper for numacontrol which sets up cpu and memory binding:
5962

6063
submission script:
6164

6265
```bash title="run_lammps_kokkos.sh"
6366
#!/bin/bash -l
6467
#SBATCH --job-name=<JOB_NAME>
65-
#SBATCH --time=01:00:00
68+
#SBATCH --time=01:00:00 # (1)!
6669
#SBATCH --nodes=2
67-
#SBATCH --ntasks-per-node=4
70+
#SBATCH --ntasks-per-node=4 # (2)!
6871
#SBATCH --gres=gpu:4
69-
#SBATCH --account=<ACCOUNT>
70-
#SBATCH --uenv=<LAMMPS_UENV>:/user-environment
72+
#SBATCH --account=<ACCOUNT> # (3)!
73+
#SBATCH --uenv=<LAMMPS_UENV>:/user-environment # (4)!
7174
#SBATCH --view=kokkos
7275

7376
export MPICH_GPU_SUPPORT_ENABLED=1
@@ -77,10 +80,10 @@ ulimit -s unlimited
7780
srun ./wrapper.sh lmp -in lj_kokkos.in -k on g 1 -sf kk -pk kokkos gpu/aware on
7881
```
7982

80-
* Time format: `HH:MM:SS`.
81-
* For LAMMPS+kokkos its typical to only use 1 MPI-rank per GPU.
82-
* Change `<ACCOUNT>` to your project account name.
83-
* Change `<LAMMPS_UENV>` to the name (or path) of the LAMMPS uenv you want to use.
83+
1. Time format: `HH:MM:SS`.
84+
2. For LAMMPS+kokkos its typical to only use 1 MPI-rank per GPU.
85+
3. Change `<ACCOUNT>` to your project account name.
86+
4. Change `<LAMMPS_UENV>` to the name (or path) of the LAMMPS uenv you want to use.
8487

8588
numacontrol wrapper:
8689

@@ -98,7 +101,7 @@ export MPICH_GPU_SUPPORT_ENABLED=1
98101
numactl --cpunodebind=$NUMA_NODE --membind=$NUMA_NODE "$@"
99102
```
100103

101-
With the above scripts, you can launch a [LAMMPS] + kokkos calculation on 2 nodes, using 4 MPI-ranks per node and 4 GPUs per node with:
104+
With the above scripts, you can launch a LAMMPS + kokkos calculation on 2 nodes, using 4 MPI-ranks per node and 4 GPUs per node with:
102105

103106
```bash
104107
sbatch run_lammps_kokkos.sh
@@ -341,3 +344,7 @@ CG-SPICA GPU KSPACE MANYBODY MOLECULE PYTHON RIGID
341344

342345
!!! TODO !!!
343346

347+
[LAMMPS]: https://www.lammps.org
348+
[GNU Public License]: http://www.gnu.org/copyleft/gpl.html
349+
[uenv]: https://eth-cscs.github.io/cscs-docs/software/uenv
350+
[SLURM]: https://slurm.schedmd.com/documentation.html

0 commit comments

Comments
 (0)