Compiling LIGGGHTS with OpenMPI

LIGGGHTS stands for LAMMPS improved for general granular and granular heat transfer simulations.

There are similarities compiling LAMMPS and LIGGGHTS since both applications are related. Do take a look at Compiling LAMMPS-7Dec2015 with OpenMPI and GNU

FFTW, OpenMPI and GNU compilation are not covered here.


Step1: Download Download LIGGGHTS®-PUBLIC Using GIT. For more information see

# git clone
# git clone

to get the latest version, open a terminal,

# git pull

Step 2: Configure and Compile LIGGGHTS

# vim Makefile.openmpi

In Line 41,42,43 AND  52,53,54 comments the line or leave it blank



Step 3: Check and Build Packages
Check and Build Standard Package and exclude packages you will not need.

# make package-status
Installed  NO: package COHESIONMODELS
Installed YES: package MOLECULE
Installed YES: package PASCAL
Installed YES: package POEMS
Installed YES: package RIGID line 7: cd: SURFACEMODELS: No such file or directory
Installed  NO: package SURFACEMODELS
Installed YES: package VORONOI

For example, exclude those you do not need.

# make yes-standard
# make no-asphere
# make no-voronoi
# make no-pascal
# make no-poems

Step 4: Compile LIGGGHTS
Check make options. Go to src

# make openmpi
# make lmp_openmpi

Step 5: Create a /usr/local/liggghts-12Jan16 and copy libraries.

# cp -Rv doc /usr/local/liggghts-12Jan16
# cp -Rv examples /usr/local/liggghts-12Jan16
# cp -Rv python /usr/local/liggghts-12Jan16
# cp README /usr/local/liggghts-12Jan16
# cp -Rv lib /usr/local/liggghts-12Jan16 
# cp lmp_openmpi /usr/local/liggghts-12Jan16/bin

Create a softlinks

# ln -s lmp_openmpi lggghts

Compiling LAMMPS-7Dec2015 with OpenMPI and GNU

From what I know for LAMMPS-7Dec2015, you should be able to e FFTW3. The current version at this point in writing is FFTW-3.3.4 (

Step 1: Compiling FFTW-3.3.4

# tar -zxvf fftw-3.3.4.tar.gz
# cd fftw-3.3.4
# ./configure --prefix=/usr/local/fftw-3.3.4 CC=mpicc F77=mpif90
# make -j 16
# make install

Step 1a. Compile OpenMPI and GNU (Not covered here)

Step 2: Untar LAMMPS

# tar -zxvf lammps-stable.tar.gz

Step 3: Prepare libraries for lammps

3a. lib/reax

# make -f Makefile.gfortran

3b. lib/meam

# make -f Makefile.gfortran

3c. lib/poems

# make -f Makefile.g++

Step 4: Compile required the packages. Go to src directory

# cd src

4a. Check which packages are included

# make package-status
Installed YES: package ASPHERE
Installed YES: package BODY
Installed YES: package CLASS2
Installed YES: package COLLOID
Installed YES: package COMPRESS
Installed YES: package CORESHELL
Installed YES: package DIPOLE
Installed YES: package FLD
Installed  NO: package GPU
Installed YES: package GRANULAR
Installed  NO: package KIM
Installed YES: package KOKKOS
  src/pair_lj_sdk_kokkos.cpp does not exist
  src/pair_lj_sdk_kokkos.h does not exist
Installed YES: package KSPACE
Installed YES: package MANYBODY
Installed YES: package MC
Installed YES: package MEAM
Installed YES: package MISC
Installed YES: package MOLECULE
Installed YES: package MPIIO
Installed YES: package OPT
Installed YES: package PERI
Installed YES: package POEMS
Installed YES: package PYTHON
Installed YES: package QEQ
Installed YES: package REAX
Installed YES: package REPLICA
Installed YES: package RIGID
Installed YES: package SHOCK
Installed YES: package SNAP
Installed YES: package SRD
Installed  NO: package VORONOI
Installed YES: package XTC

4b. Choose all the standard

# make yes-standard

4c. Exclude packages that are not required

# make no-voronoi
# make no-kim
# make no-gpu

Step 5: Edit src/MAKE/Makefile.mpi

Around Line 43, 44
Leave MPI_PATH and MPI_LIB empty.


Around Line 53,54,55

FFT_INC =  -I/usr/local/fftw-3.3.3-single/include -DFFT_FFTW
FFT_PATH = -L/usr/local/fftw-3.3.3-single/lib
FFT_LIB = -lfftw

Step 6: Compile LAMMPS

Check make options. Go to src

# make
# make ompi_g++

Step 7: Create a /usr/local/lammps-7Dec15 and copy libraries. Go to lammps root directory

# cp -Rv bench /usr/local/lammps-7Dec15
# cp -Rv doc /usr/local/lammps-7Dec15
# cp -Rv examples /usr/local/lammps-7Dec15
# cp -Rv potentials /usr/local/lammps-7Dec15
# cp README /usr/local/lammps-7Dec15
# cp -Rv tools /usr/local/lammps-7Dec15
# cp -Rv lib /usr/local/lammps-7Dec15/lib
# cp lmp_ompi_g++ /usr/local/lammps-7Dec15/bin

7a. Create a softlinks

# lns -s /usr/local/lammps-7Dec15/bin/lmp_ompi_g++ lammps


  1. Quick install guide for LAMMPS on Linux cluster

Installing Berkeley UPC on CentOS 6 and GNU-4.8


  1. Download the Berkeley UPC from the Download Site. I use the
  2. Compile GNU 4.8.x. Do take a look at Compiling GNU 4.8.1 on CentOS 6
  3. Compile OpenMPI on GNU-4.8.1


Step 1: Make sure your PATH and LD_LIBRARY_PATH reflect the GNU and OpenMPI Path

Step 2: Untar and Compile Berkeley UPC

# tar -zxvf berkeley_upc-2.22.0.tar.gz
# cd berkeley_upc-2.22.0
# mkdir build
# cd build
# ../configure CC=gcc CXX=g++ MPI_CC=mpicc --prefix=/usr/local/berkeley_upc-2.22.0
# gmake

Step 3: Untar and Compile the local UPC-C translator

Download the Berkeley Translator from the Download site.

# tar -zxvf berkeley_upc_translator-2.18.0.tar.gz
# cd berkeley_upc_translator-2.18.0
# make

After completion of successful build, it will show you the translator location path. Copy the line

translator = /usr/local/berkeley_upc_translator-2.18.0/open64/osprey1.0/build_ia64

and replace the line at the following files


Step 4: Finally make install Berkeley UPC

# make install

Step 5: Test

# upcc --version
# upcrun


  1. Installing Berkeley UPC on a Linux cluster