install lammps
The following note works for intel icc compiler on linux system.
updated 20140827
1. download source file lammps.tar.gz,unzip the file
gunzip lammps.tar.gz
tar xvf lammps.tar
go to source code directory /src, example Makefiles for different platforms are in /src/MAKE,
choose the closest one to compile, e.g. Makefile.linux (which uses icc)
under /src/, type
make linux
It won't work. I promise you. You will see two types of errors:
one for missing fast Fourier transform library fftw,
the other for missing message passing interface (mpi) for parallel computing.
2. how to avoid FFTW
simply leave the three lines blank in Makefile.linux
FFT_INC = FFT_PATH = FFT_LIB =
3. how to avoid mpi and only use single processor
go to /src/STUBS
make
modify the /src/MAKE/Makefile.linux as
MPI_INC = -I../STUBS MPI_PATH = -L../STUBS MPI_LIB = -lmpi_stubs
4. install FFTW
http://www.fftw.org/download.html
gunzip fftw-2.1.5.tar.gz
tar xvf fftw-2.1.5.tar
cd fftw-2.1.5
./configure --prefix=/home/fas/ohern/kz87/scratch/Lammps/fftw2 --enable-float
make
make install
modify the /src/MAKE/Makefile.linux as
FFT_INC = -I/home/fas/ohern/kz87/scratch/Lammps/fftw2/include #-l/home/fas/... for g++ ? FFT_PATH = -L/home/fas/ohern/kz87/scratch/Lammps/fftw2/lib FFT_LIB = -lfftw
5. instal mpich2 or above (mpich1 is not working for missing -lmpl)
install mpich2 or mpich3 in working directory, e.g. /home/fas/ohern/kz87/scratch/Lammps/mpich3
get recent version, e.g. mpich-3.1.2.tar.gz on http://www.mpich.org/downloads/
gunzip mpich-3.1.2.tar.gz
tar xvf mpich-3.1.2.tar
cd mpich-3.1.2
./configure --prefix=/home/fas/ohern/kz87/scratch/Lammps/mpich3 --enable-threads --enable-shared ?
Error message:
configure: error: F90 and F90FLAGS are replaced by FC and FCFLAGS respectively in this configure,
please unset F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure again
and missing the Makefile, then get rid of fortran
unset F90
unset F90FLAGS
./configure --prefix=/home/fas/ohern/kz87/scratch/Lammps/mpich3
make
make install
modify the /src/MAKE/Makefile.linux as
MPI_INC = -I/home/fas/ohern/kz87/scratch/Lammps/mpich3/include MPI_PATH = -I/home/fas/ohern/kz87/scratch/Lammps/mpich3/lib MPI_LIB = -lmpich -lmpl -lpthread
Compile mpi version
updated 20141205
Download Stable version (30 Oct 2014) lammps-stable.tar.gz
gunzip lammps-stable.tar.gz
tar xvf lammps-stable.tar
cd lammps-30Oct14/src
make mpi
If mpi library is missing, do this first and compile again
module load Compat/MPI/OpenMPI/1.4.4