[lammps-users] Installation Problem

Dear Naresh,

In the archive there is a very useful post from 2010-05-24 with step by step instructions to install lammps on a linux box by Ram Chand. It worked with only minor modification for a CentOS 5 installation (which is Red Hat Linux without the support). You are using a different compiler so, some of the compiler settings may vary, but the post will walk you through just about everything you need to do to install the FFTW and MPI libraries and to link to these libraries in your LAMMPS makefile. This post was kind of the Rosetta Stone for LAMMPS installation when I had to interpret, what for me at the time, were cryptic error messages from the make/ install process. I’ve reproduced the post below.


Email Archive: lammps-users (read-only)
[lammps-users] Installation of lammps
Attachments: HTML-Email.html
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). M
Note: please replace “ram” as your directory name.:

  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
  8. I changed it to openmpi, now cd openmpi
  9. ./configure --prefix=/home/ram/openmpi/prefix
  10. 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:
  11. gedit /etc/bashrc (whatever your shell is)
  12. 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