Difference between revisions of "Benchmarking: LAMMPS"

From Define Wiki
Jump to navigation Jump to search
Line 40: Line 40:
 
MPI_PATH =      -L/usr/mpi/intel/openmpi-1.4.3/lib64
 
MPI_PATH =      -L/usr/mpi/intel/openmpi-1.4.3/lib64
 
MPI_LIB =
 
MPI_LIB =
 +
 +
# From the original build flags
 +
SHFLAGS =      -fPIC
 +
SIZE =          size
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 11:27, 11 October 2012

Intel Build

Built using:

  • OpenMPI 1.4.3 (source /usr/mpi/intel/openmpi-1.4.3/bin/mpivars.sh ; built using intel composer 2013)
  • Intel compilers (source /share/apps/intel/composer_xe_2013.0.079/bin/compilervars.sh intel64)

Useful background on lammps:

Download source

Pull latest version from: http://lammps.sandia.gov/tars

  wget http://lammps.sandia.gov/tars/lammps.tar.gz
  tar zxvf lammps.tar.gz
  cd lammps/src/MAKE

Build MKL FFTW

  cd /share/apps/intel/composer_xe_2013.0.079/mkl/interfaces/fftw2xc
  make libintel64 compiler=intel

Edit the Makefile

Using openmpi for this build so edit Makefile.openmpi

CC =            icc
CCFLAGS =       -O2 -fno-exceptions -fno-rtti -ansi-alias -march=core2 -mtune=core2 -pc64 -no-prec-div -no-prec-sqrt -unroll
DEPFLAGS =      -M

LINK =          mpicc
LINKFLAGS =     -O2 -L/share/apps/intel/composer_xe_2013.0.079/mkl/lib/intel64/
LIB =           -L/share/apps/intel/composer_xe_2012.0.079/mkl/lib/intel64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lstdc++

FFT_INC =       -DFFT_FFTW -I/share/apps/intel/composer_xe_2013.0.079/mkl/include/fftw
FFT_PATH =
FFT_LIB =       /share/apps/intel/composer_xe_2013.0.079/mkl/lib/intel64/libfftw2xc_intel.a

MPI_INC =       -I/usr/mpi/intel/openmpi-1.4.3/include -DMPICH_IGNORE_CXX_SEEK
MPI_PATH =      -L/usr/mpi/intel/openmpi-1.4.3/lib64
MPI_LIB =

# From the original build flags
SHFLAGS =       -fPIC
SIZE =          size

GCC Build

Compilation using openmpi/gcc

  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