[lammps-users] Installation of lammps

If you want to install LAMMPS on cluster then follow this method, (Please let me know which Linux you are using I can make makefile for you). Meanwhile follow these instructions: -

Note: please replace “ram” as your directory name.:
A: FFTW (installation of FFTW)
1. Install fftw-2.1.5.tar.gz from
2. tar -zvxf fftw-2.1.5.tar.gz
3. mkdir prefix
4. change it to fftw for easy and cd fftw
5. ./configure --prefix=/home/ram/fftw/prefix --enable-float --enable-debug
6. make
7. make install

B: OPENMPI (installation of mpi)
1.tar -zvxf openmpi.tar.gz
2. I changed it to openmpi, now cd openmpi
3. ./configure --prefix=/home/ram/openmpi/prefix
4. make all install
Note: check if mpirun command makes no error in shell. if mpirun command does not run in shell then add this line in your shell like:
1. gedit /etc/bashrc (whatever your shell is)
2. add this line in last and save: export PATH=/home/ram/openmpi/prefix/bin:$PATH

C: LAMMPS (installation of LAMMPS)
1. Download the source tar file
2. Untar as tar -zvxf lammps.tar.gz
3. cd lammps-14Oct09/src/MAKE
4. gedit Makefile.linux
5. Modify the Makefile.linux as per your PATH of OpenMPI & FFTW as below

# linux = RedHat Linux box, GNU gcc, OMPI, FFTW

SHELL = /bin/sh

# System-specific settings

CC = /home/ram/openmpi/prefix/bin/mpicc
LINK = /home/ram/openmpi/prefix/bin/mpicc
LINKFLAGS = -O -L/home/ram/openmpi/prefix/lib -L/home/ram/fftw/prefix/lib
USRLIB = -lfftw -lmpi
SYSLIB = -lpthread -lstdc++
SIZE = size
5. cd … and perform “make linux”
6.export LD_LIBRARY_PATH=/home/ram/openmpi-1.3.3/prefix/lib
Successful configuration & installation does generate an
executable called “lmp_linux”, check it’s library dependency by doing
“ldd lmp_linux”, every link to the library should be present. If any
error happens, export the path of openmpi/prefix/lib as “export
LD_LIBRARY_PATH=/home/ram/openmpi/prefix/lib” in the same console
where you are performing “make linux” command


Ram Chand
PhD Scholar