Skip to content

Commit e77d1ef

Browse files
committed
lammps GPU test case new
1 parent a086159 commit e77d1ef

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

benchmark/LAMMPS/GPU/in_3.lj

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# 3d Lennard-Jones melt
2+
# Example taken from: https://fzj-jsc.github.io/tuning_lammps/
3+
variable x index 60
4+
variable y index 60
5+
variable z index 60
6+
variable t index 1000
7+
8+
variable xx equal 1*$x
9+
variable yy equal 1*$y
10+
variable zz equal 1*$z
11+
12+
variable interval equal $t/2
13+
14+
units lj
15+
atom_style atomic
16+
17+
lattice fcc 0.8442
18+
region box block 0 ${xx} 0 ${yy} 0 ${zz}
19+
create_box 1 box
20+
create_atoms 1 box
21+
mass 1 1.0
22+
23+
velocity all create 1.44 87287 loop geom
24+
25+
pair_style lj/cut 2.5
26+
pair_coeff 1 1 1.0 1.0 2.5
27+
28+
neighbor 0.3 bin
29+
neigh_modify delay 0 every 20 check no
30+
31+
fix 1 all nve
32+
33+
thermo ${interval}
34+
thermo_style custom step time temp press pe ke etotal density
35+
run $t

benchmark/LAMMPS/GPU/job-cpu.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
#SBATCH -A Project_ID
3+
#SBATCH -t 00:10:00
4+
#SBATCH -n 28
5+
6+
#Load modules necessary for running LAMMPS
7+
ml purge
8+
ml GCC/8.3.0 OpenMPI/3.1.4
9+
ml LAMMPS/3Mar2020-Python-3.7.4-kokkos
10+
11+
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
12+
export OMP_PROC_BIND=spread
13+
export OMP_PLACES=threads
14+
srun lmp -in in_3.lj > output_cpu.dat
15+

benchmark/LAMMPS/GPU/job-gpu.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
#SBATCH -A Project_ID
3+
#SBATCH -t 00:10:00
4+
#SBATCH -c 1
5+
#SBATCH -n 1
6+
#SBATCH --gres=gpu:k80:1
7+
#For v100 uncomment the following line and comment out previous one
8+
###SBATCH --gres=gpu:v100:(1 or 2)
9+
10+
#Load modules necessary for running LAMMPS
11+
ml purge
12+
ml GCC/8.3.0 CUDA/10.1.243 OpenMPI/3.1.4
13+
ml LAMMPS/3Mar2020-Python-3.7.4-kokkos
14+
15+
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
16+
export OMP_PROC_BIND=spread
17+
export OMP_PLACES=threads
18+
srun lmp -in in_3.lj -k on g 1 -sf kk -pk kokkos cuda/aware off > output_gpu.dat
19+

0 commit comments

Comments
 (0)