Skip to content

Commit 1afab2e

Browse files
more updates
1 parent ea58325 commit 1afab2e

File tree

1 file changed

+39
-43
lines changed

1 file changed

+39
-43
lines changed

docs/software/sciapps/lammps.md

Lines changed: 39 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,16 @@ You may need to make the `wrapper.sh` script executable (`chmod +x wrapper.sh`).
156156

157157
### Running LAMMPS+GPU on the HPC Platform
158158

159-
To start a job, two bash scripts are required: a [Slurm][ref-slurm] submission script, and a wrapper for `numactl` which sets up CPU and memory binding.
159+
To start a job, two bash scripts are required: a [Slurm][ref-slurm] submission script, and a wrapper for [CUDA MPS][ref-slurm-gh200-multi-rank-per-gpu].
160160

161161
```bash title="run_lammps_gpu.sh"
162162
#!/bin/bash -l
163163
#SBATCH --job-name=<JOB_NAME>
164164
#SBATCH --time=01:00:00 (1)
165-
#SBATCH --nodes=2
166-
#SBATCH --ntasks-per-node=32 (2)
165+
#SBATCH --nodes=2 (2)
166+
#SBATCH --ntasks-per-node=32
167167
#SBATCH --gres=gpu:4
168-
#SBATCH --account=<ACCOUNT> (3)
168+
#SBATCH --account=<ACCOUNT> (3)
169169
#SBATCH --uenv=<LAMMPS_UENV>:/user-environment (4)
170170
#SBATCH --view=gpu (5)
171171

@@ -179,52 +179,50 @@ srun ./mps-wrapper.sh lmp -sf gpu -pk gpu 4 -in lj.in
179179
To enable oversubscription of MPI ranks per GPU, you'll need to use the `mps-wrapper.sh` script provided at the following page: [NVIDIA GH200 GPU nodes: multiple ranks per GPU][ref-slurm-gh200-multi-rank-per-gpu]
180180

181181
1. Time format: `HH:MM:SS`.
182-
2. For LAMMPS+gpu its often beneficial to use more than 1 MPI rank per GPU.
182+
2. For LAMMPS+gpu it is often beneficial to use more than 1 MPI rank per GPU. To enable oversubscription of MPI ranks per GPU, you'll need to use the `mps-wrapper.sh` script provided in the following section: [multiple ranks per GPU][ref-slurm-gh200-multi-rank-per-gpu].
183183
3. Change `<ACCOUNT>` to your project account name.
184184
4. Change `<LAMMPS_UENV>` to the name (or path) of the LAMMPS uenv you want to use.
185-
5. Load the `gpu` uenv view.
186-
187-
#### LAMMPS + kokkos input file
185+
5. Enable the `gpu` uenv view.
188186

189-
Below is the input file used in the above script, defining a 3d Lennard-Jones melt.
190-
191-
```
192-
# 3d Lennard-Jones melt
193-
variable x index 200
194-
variable y index 200
195-
variable z index 200
196-
variable t index 1000
187+
#### LAMMPS + GPU input file
188+
??? example "LAMMPS+GPU input file, defining a 3d Lennard-Jones melt."
189+
```
190+
# 3d Lennard-Jones melt
191+
variable x index 200
192+
variable y index 200
193+
variable z index 200
194+
variable t index 1000
197195

198-
variable xx equal 1*$x
199-
variable yy equal 1*$y
200-
variable zz equal 1*$z
196+
variable xx equal 1*$x
197+
variable yy equal 1*$y
198+
variable zz equal 1*$z
201199

202-
variable interval equal $t/2
200+
variable interval equal $t/2
203201

204-
units lj
205-
atom_style atomic
202+
units lj
203+
atom_style atomic
206204

207-
lattice fcc 0.8442
208-
region box block 0 ${xx} 0 ${yy} 0 ${zz}
209-
create_box 1 box
210-
create_atoms 1 box
211-
mass 1 1.0
205+
lattice fcc 0.8442
206+
region box block 0 ${xx} 0 ${yy} 0 ${zz}
207+
create_box 1 box
208+
create_atoms 1 box
209+
mass 1 1.0
212210

213-
velocity all create 1.44 87287 loop geom
211+
velocity all create 1.44 87287 loop geom
214212

215-
pair_style lj/cut 2.5
216-
pair_coeff 1 1 1.0 1.0 2.5
213+
pair_style lj/cut 2.5
214+
pair_coeff 1 1 1.0 1.0 2.5
217215

218-
neighbor 0.3 bin
219-
neigh_modify delay 0 every 20 check no
216+
neighbor 0.3 bin
217+
neigh_modify delay 0 every 20 check no
220218

221-
fix 1 all nve
219+
fix 1 all nve
222220

223-
thermo ${interval}
224-
thermo_style custom step time temp press pe ke etotal density
225-
run_style verlet
226-
run $t
227-
```
221+
thermo ${interval}
222+
thermo_style custom step time temp press pe ke etotal density
223+
run_style verlet
224+
run $t
225+
```
228226

229227
### Running on Eiger
230228

@@ -283,8 +281,9 @@ Alternatively, the CMake variable `-DEXTERNAL_KOKKOS=yes` should force CMake to
283281

284282
#### Using LAMMPS uenv as an upstream Spack Instance
285283

286-
If you'd like to extend the existing uenv with additional packages (or your own), you can use the provide LAMMPS uenv to provide all dependencies needed to build your customization. See https://eth-cscs.github.io/alps-uenv/uenv-compilation-spack/ for more information.
284+
If you'd like to extend the existing uenv with additional packages (or your own), you can use the LAMMPS uenv to provide all dependencies needed to build your customization. See [here](https://eth-cscs.github.io/alps-uenv/tutorial-spack) for more information.
287285

286+
<!--
288287
First, set up an environment:
289288
290289
```
@@ -347,10 +346,7 @@ Installed packages:
347346
348347
CG-SPICA GPU KSPACE MANYBODY MOLECULE PYTHON RIGID
349348
```
350-
351-
## Scaling
352-
353-
!!! TODO !!!
349+
-->
354350

355351
[LAMMPS]: https://www.lammps.org
356352
[GNU Public License]: http://www.gnu.org/copyleft/gpl.html

0 commit comments

Comments
 (0)