Skip to content

Submitting LAMMPS Jobs With Torque

This script is an example of launching individual LAMMPS jobs on the Kennesaw State HPC Cluster.

Torque Shell Script

In our example, we saved the following Torque script as run_lammps.pbs (making sure to change netid@kennesaw.edu in the script to your correct email address):

run_lammps.pbs
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

#PBS -l nodes=1:ppn=32
#PBS -l walltime=60:00:00
#PBS -m abe
#PBS -M netid@kennesaw.edu (1)

JOBID=`echo $PBS_JOBID | cut -f1 -d.`
cd $PBS_O_WORKDIR

# Load the modules we need
module load LAMMPS

export OMP_NUM_THREADS=1

MPIRUN=/data/Apps/intel/18.0.2/compilers_and_libraries_2018.2.199/linux/mpi/intel64/bin/mpirun
LAMMPS_EXE=${LAMMPS_BIN}/lammps

${MPIRUN} -np 16 ${LAMMPS_EXE} -in ${FILE} > ${FILE}.${JOBID}
  1. 🙋‍♂️ Make sure to change netid@kennesaw.edu on this line to your KSU email address or you won't receive emails when the job starts and stops.

Usage

Assuming you saved the Torque script from above as run_lammps.pbs, and the name of your LAMMPS script is mpi_script.R, you can submit your LAMMPS job with the following command:

[barney@hpc ~]$ qsub run_lammps.pbs -vFILE=${PWD}/lammps_script.in