LAMMPS
What is LAMMPS
LAMMPS is a classical molecular dynamics code with a focus on materials modeling. It is an acronym for Large-scale Atomic/Molecular Massively Parallel Simulator.
LAMMPS features potentials for solid-state materials (metals, semiconductors), soft matter (biomolecules, polymers), and coarse-grained or mesoscopic systems. It can be used to model atoms or, more generically, as a parallel particle simulator at the atomic, meso, or continuum scale.
LAMMPS runs on single processors or in parallel using message-passing techniques and spatial decomposition of the simulation domain. Many of its models provide accelerated performance on CPUs and GPUs. The code is designed to be easily modified or extended with new functionality.
How to use LAMMPS on ENEAGRID/CRESCO infrastructure
In this page you can find the launching and submission syntax for LAMMPS codes on the ENEAGRID/CRESCO infrastructure. Please read the following documentation for running serial/parallel applications on CRESCO clusters using the SLURM framework: Batch Jobs / SLURM. This is not a tutorial about using LAMMPS; for that, you may find documentation, the manual, tutorials, and books on the official website www.lammps.org/.
Job submission on CRESCO8
To submit LAMMPS on CRESCO8, there are three possible options: lammps/2024_serial and lammps/2024_mpi for the cresco8_cpu partition, and lammps/2024_gpu for the cresco8_gpu partition.
To use lammps/2024_serial and lammps/2024_mpi, login at one of the two front-ends (cresco8x001.portici.enea.it or cresco8x002.portici.enea.it) and load the following base modules:
1) pfs
2) base
3) slurm_tools
4) intel/oneapi
5) mpi_flavour/impi-oneapi
lammps/2024_serial
Load the corresponding module:
module load lammps/2024_serial
Then launch a batch job using a SLURM script with the command:
sbatch script_serial.sh
where, for example, script_serial.sh is:
#!/bin/bash
#SBATCH --job-name=nome_job
#SBATCH --err=%j.err # standard error file
#SBATCH --out=%j.out # standard output file
#SBATCH --time=24:00:00 # time limit
#SBATCH --nodes=1 # number of nodes
#SBATCH --ntasks-per-node=1 # number of tasks per node
#SBATCH --cpus-per-task=1 # number of threads per node
#SBATCH --partition=cresco8_cpu # partition name
#SBATCH --account=enea
#SBATCH --auks=yes
#SBATCH --exclusive
aklog
lmp -in file_input.in + "lammps_options"
lammps/2024_mpi
Load the corresponding module:
module load lammps/2024_mpi
Then launch a batch job using a SLURM script with the command:
sbatch script_mpi.sh
where, for example, script_mpi.sh is:
#!/bin/bash
#SBATCH --job-name=nome_job
#SBATCH --err=%j.err # standard error file
#SBATCH --out=%j.out # standard output file
#SBATCH --time=24:00:00 # time limit
#SBATCH --nodes=1 # number of nodes
#SBATCH --ntasks-per-node=4 # number of tasks per node
#SBATCH --cpus-per-task=4 # number of threads per node
#SBATCH --partition=cresco8_cpu # partition name
#SBATCH --account=enea
#SBATCH --auks=yes
#SBATCH --exclusive
aklog
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
mpirun lmp -in file_input.in + "lammps_options"
lammps/2024_gpu
To use lammps/2024_gpu, login at the front-end cresco8-gpu01 and load the following modules:
1) pfs
2) base
3) slurm_tools
4) intel/oneapi2025
5) mpi_flavour/impi-oneapi2025
6) lammps/2024_gpu
Then launch a batch job using a SLURM script with the command:
sbatch script_gpu.sh
where, for example, script_gpu.sh is:
#!/bin/bash
#SBATCH --job-name=nome_job
#SBATCH --err=%j.err # standard error file
#SBATCH --out=%j.out # standard output file
#SBATCH --time=24:00:00 # time limit
#SBATCH --nodes=2 # number of nodes
#SBATCH --ntasks-per-node=8 # number of tasks per node
#SBATCH --cpus-per-task=16 # number of threads per node
#SBATCH --gres=gpu:8 # number of gpu per node
#SBATCH --gpus-per-task=1 # number of gpu per task
#SBATCH --partition=cresco8_gpu # partition name
#SBATCH --account=enea
#SBATCH --auks=yes
#SBATCH --exclusive
aklog
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
mpirun lmp -in file_input.in + "lammps_options"
ENEAGRID/CRESCO utilization rules
Please check the ENEAGRID/CRESCO conditions of access and how to cite LAMMPS.