Skip to content


LAMMPS is a molecular dynamics application for large-scale atomic/molecular parallel simulations of solid-state materials, soft matter and mesoscopic systems.

LAMMPS is available as a module on Apocrita.


To run a LAMMPS job with GPU support, follow these requirements:

  • Request the GPU node set in the job script. Instructions on submitting jobs to the GPU nodes are available here.
  • Load the GPU module for LAMMPS: lammps/<version>-gpu.
  • Use the binary for LAMMPS compiled with GPU: lmp_gpu.
  • Pass the following required options to the LAMMPS binary: -sf gpu and -pk gpu <number_of_requested_gpu_cards>.


To run the latest installed version of LAMMPS, simply load the lammps module:

Parallel support

LAMMPS will only run on parallel nodes using the parallel environment.

$ module load lammps
$ mpirun -np ${NSLOTS} lmp_intel_cpu_intelmpi --help
LAMMPS (11 Aug 2017)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
  using 1 OpenMP thread(s) per MPI task

Large-scale Atomic/Molecular Massively Parallel Simulator - 11 Aug 2017

Usage example: lmp_intel_cpu_intelmpi -var t 300 -echo screen -in in.alloy

For more help use --help option.

LAMMPS Packages

LAMMPS has been compiled with extra packages, for a full list, please run: module help with the full LAMMPS module. Example: module help lammps/11AUG17-intelmpi

Example Jobs

Parallel job

Here is an example job for LAMMPS using 64 cores with an infiniband connection across 2 nxv nodes.

#$ -cwd
#$ -j y
#$ -pe parallel 64
#$ -l infiniband=nxv
#$ -l h_rt=1:0:0
#$ -N lammps_parallel_test

module load lammps

mpirun -np ${NSLOTS} lmp_intel_cpu_intelmpi \
       -in in.reax.rdx \
       -log output.log

GPU job

Here is an example job for LAMMPS using 2 GPU cards on a single nxg node.

#$ -cwd
#$ -pe parallel 32
#$ -l gpu=2
#$ -l infiniband_direct=nxg3-4

module load lammps/<version>-gpu


mpirun -np ${NSLOTS} lmp_gpu \
       -sf gpu \
       -pk gpu 2 \
       -in \