Loading LAMMPS

  • modulelammps/a100-gpu/2Aug2023
  • modulelammps/a100-gpu/23Jun2022
  • modulelammps/a100-gpu/29Sep2021
  • modulelammps/gcc13.2/mvapich2.3.7/2Aug2023
  • modulelammps/intel/2022.2/29Oct2020
  • modulelammps/intel/2022.2/03Aug2022
  • modulelammps/intel/2023.1/2Aug2023
  • modulelammps/intel/2024.0/29Aug2024
  • modulelammps/aocc/4.0/2Aug2023
  • modulelammps/aocc/4.0/29Aug2024
  • modulelammps/intel/2023.1/2Aug2023
Tip: load modules inside your SLURM job script, not just on the login node, so compute nodes see the same environment. Verify with which after loading.

Commands

  • BUILD_TOOLSBuild tools for managing and compiling LAMMPS
  • PKG_SMTBQProvides support for the SMTBQ package
  • PKG_MCMonte Carlo methods for simulations
  • PKG_MEAMModified Embedded Atom Method potential
  • PKG_VORONOIComputes Voronoi tessellations
  • PKG_MANYBODYSupport for many-body potentials
  • PKG_MOLECULESupport for molecular simulations
  • PKG_PYTHONEnables Python scripting interface
  • PKG_COMPRESSEnables support for compressed file I/O
  • PKG_OPTPerformance optimization package
  • PKG_KSPACELong-range electrostatics and van der Waals interactions
  • PKG_QEQCharge equilibrium method for atomic systems
  • PKG_REACTIONReactive force fields for chemical reactions
  • PKG_RIGIDTools for rigid body dynamics simulations
  • PKG_BODYSupport for complex body simulations
  • PKG_SPHSmoothed Particle Hydrodynamics (SPH) package
  • PKG_GRANULARGranular material simulations
  • PKG_DIPOLEPolarization and dipole interactions
  • PKG_SHOCKShockwave and impact simulations
  • PKG_SRDStochastic rotation dynamics for mesoscale flows
  • PKG_CORESHELLCore-shell particle interactions
  • PKG_VOROVoronoi-based analysis tools
  • PKG_REPLICAMethods for replica exchange simulations
  • PKG_PERIPeridynamics modeling package
  • PKG_MISCMiscellaneous features and utilities
  • PKG_OPENMPEnables OpenMP parallelization
  • WITH_PNGEnables PNG image support
  • WITH_JPEGEnables JPEG image support
  • FFT=MKLUses Intel MKL for FFT computations
  • PKG_MPIIOEnables MPI-IO support for parallel I/O

Example usage

Load a LAMMPS module (general form)

module load lammps/<compiler>/<version>

Load a CPU (Intel) LAMMPS module

module load lammps/intel/2024.0/29Aug2024

Load an A100 GPU LAMMPS module

module load lammps/a100-gpu/2Aug2023

Run LAMMPS in parallel with MPI

mpirun -np <number_of_processes> lmp -in <input_file>

Enable GPU package in a LAMMPS input

package gpu 1 neigh yes newton on

Run LAMMPS on 40 CPU cores

mpirun -np 40 lmp_mpi -in input.lammps -log log.lammps

Run GPU-enabled LAMMPS

mpirun -np 4 lmp_gpu -in input.lammps -log log.lammps -var GPU 1

CPU Slurm job script example

#!/bin/bash
#SBATCH --job-name=lammps_cpu
#SBATCH --output=lammps_%j.out
#SBATCH --error=lammps_%j.err
#SBATCH -p short-40core
#SBATCH --time=24:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=40 module load lammps/intel/2024.0/29Aug2024 INPUT="input.lammps"
LOG="log.lammps" mpirun -np $SLURM_NTASKS lmp_mpi -in $INPUT -log $LOG

GPU Slurm job script example

#!/bin/bash
#SBATCH --job-name=lammps_gpu
#SBATCH --output=lammps_%j.out
#SBATCH --error=lammps_%j.err
#SBATCH --time=2:00:00
#SBATCH --nodes=1
#SBATCH -p a100
#SBATCH --gres=gpu:4
#SBATCH --ntasks=4 module load lammps/a100-gpu/2Aug2023 INPUT="input.lammps"
LOG="log.lammps" mpirun -np $SLURM_NTASKS lmp_gpu -in $INPUT -log $LOG

Availability

LAMMPS is available on: SeaWulf, NVwulf.