Running LAMMPS on Grex
Note: Lammps is not available yet under the new environment SBEnv.
Introduction#
LAMMPS is a classical molecular dynamics code. The name stands for Large-scale Atomic / Molecular Massively Parallel Simulator.
Modules#
As fo now, there is no LAMMPS version added to the new environment. We will add them when users request a specific version. With that said, it is possible to use LAMMPS from the Alliance software stack after load CCEnv:
module purge
module load CCEnv
module load arch/avx512
module load StdEnv/2023
module load intel/2023.2.1 openmpi/4.1.5
module load lammps-omp/20230802
Serial version#
Script example for LAMMPS: Serial version
#!/bin/bash
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=1500M
#SBATCH --time=0-3:00:00
#SBATCH --job-name=Lammps-Test
# Load the modules:
module purge
module load CCEnv
module load arch/avx512
module load StdEnv/2023
module load intel/2023.2.1 openmpi/4.1.5
module load lammps-omp/20230802
echo "Starting run at: `date`"
lmp_exec=lmp
lmp_input="lammps.in"
lmp_output="lammps_lj_output.txt"
${lmp_exec} < ${lmp_input} > ${lmp_output}
echo "Program finished with exit code $? at: `date`"
MPI version#
Script example for LAMMPS: MPI version
#!/bin/bash
#SBATCH --ntasks=16
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=1500M
#SBATCH --time=0-3:00:00
#SBATCH --job-name=Lammps-Test
# Load the modules:
module purge
module load CCEnv
module load arch/avx512
module load StdEnv/2023
module load intel/2023.2.1 openmpi/4.1.5
module load lammps-omp/20230802
echo "Starting run at: `date`"
lmp_exec=lmp
lmp_input="lammps.in"
lmp_output="lammps_lj_output.txt"
srun ${lmp_exec} -in ${lmp_input} -log ${lmp_output}
echo "Program finished with exit code $? at: `date`"