Benchmarking: LAMMPS

From Define Wiki
Jump to navigation Jump to search

Compilation using openmpi

  1. Unpack the tar file
  2. Navigate into src folder
  3. Navigate into MAKE folder
  4. Edit Makefile.openmpi

Remove the flags for FFTW libaray, save and exit

Naviagate to parent folder and type

make openmpi
cp lmp_openmpi ../bench
mpirun -np 4 lmp_openmpi < in.lj

Compilation using g++

Navigate into MAKE folder Edit Makefile.g++

Change compiler and linker to mpic++ as below:

# ---------------------------------------------------------------------
# compiler/linker settings
# specify flags and libraries needed for your compiler

CC =            mpic++
CCFLAGS =       -g -O # -Wunused
SHFLAGS =       -fPIC
DEPFLAGS =      -M

LINK =          mpic++
LINKFLAGS =     -g -O
LIB =
SIZE =          size

ARCHIVE =       ar
ARFLAGS =       -rc
SHLIBFLAGS =    -shared


Remove the MPI flags

Compile as for openmpi