LAMMPS

LAMMPS is a classical molecular dynamics code with a focus on materials modelling.

This example shows how to run LAMMPS benchmark job.

Download and unarchive benchmark dataset:

curl -O http://www.phoronix-test-suite.com/benchmark-files/lammps-hecbiosim-1.tar.gz
tar -xzf lammps-hecbiosim-1.tar.gz

1. Use installed LAMMPS environment module

IDUN has preinstalled software modules:

$ module avail lammps
------- /cluster/apps/eb/modules/all --------
   LAMMPS/23Jun2022-foss-2022a-kokkos

Create job script lammps.slurm:

#!/bin/sh
#SBATCH --partition=CPUQ
#SBATCH --account=<USER_ACCOUT>
#SBATCH --time=20:00:00
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=1
#SBATCH --mem=10G
#SBATCH --job-name="lammps"
#SBATCH --output=lammps.txt
module purge
module load LAMMPS/23Jun2022-foss-2022a-kokkos
cd /cluster/home/<USER_NAME>/lammps/20k-atoms/
srun lmp -in benchmark.in

Replace <USER_ACCOUT> with your account and replace <USER_NAME> with you login user name.

Submit job:

sbatch lammps.slurm

Monitor log file changes in realtime:

tail -f /cluster/home/<USER_NAME>/lammps.txt

2. Build LAMMPS from source code.

2.1. with GCC compiler (OpenMPI)

module purge
module load foss/2023a
module load CMake/3.26.3-GCCcore-12.3.0

2.2. with Intel compiler (IntelMPI)

module purge
module load intel/2022a
module load CMake/3.23.1-GCCcore-11.3.0

2.3. Download source code and build

curl -O https://download.lammps.org/tars/lammps-stable.tar.gz
tar -xzf lammps-stable.tar.gz
cd lammps-2Aug2023
mkdir build
cd build
cmake ../cmake -D PKG_DRUDE=yes -D PKG_EXTRA-COMPUTE=yes -D PKG_EXTRA-DUMP=yes -D PKG_EXTRA-FIX=yes -D PKG_FEP=yes -D PKG_KSPACE=yes -D PKG_MISC=yes -D PKG_MOLECULE=yes -D PKG_RIGID=yes -D PKG_INTEL=yes 
cmake --build . -j
cd ../..

Path to the lmp:

/cluster/home/<USER_NAME>/lammps-2Aug2023/build/lmp
Scroll to Top