[lammps-users] Installation

Dear All,

I try to install LAMMPS ,and use make g++ after editing my makefile.g++ .
I was unable to get my executable generated with a list of error message .

A part of my Make file where I make the changes is here .Can you help me out .
I have attached my error file.Below is a part of my Make file used .

CC = /usr/bin/g++
CCFLAGS = -g -O
DEPFLAGS = -M
LINK = /usr/bin/g++
LINKFLAGS = -g -O
LIB =
ARCHIVE = ar
ARFLAGS = -rc
SIZE = size

I am confused on the specific field the above FLAGS should specify.

Thank You
John

note.doc (42.5 KB)

Dear John,

If you are using Ubuntu, you can follow this installation step.

sudo apt-get install build-essential fftw-dev tcsh mpich2 gfortran

Then, extract your Lammps software:

tar xvzf lammps.tar.gz

Copy Makefile (I attached) to lammps/src/MAKE/Makefile.ubuntu (make sure you change the name of file to Makefile.ubuntu)

compile: Make sure you are sitting in lammps-24Jan10/src (not the MAKE directory!). You’ll need the STUBS library if you’re making a serial binary

# for parallel binaries
make ubuntu
# for serial, make STUBS, then LAMMPS
cd STUBS ; make ; cd ..
make ubuntu

Try an example to verify it works

# change to the examples/crack directory
cd ../examples/crack
# for serial or parallel builds
../../lmp_ubuntu < in.crack
# for parallel builds only
mpiexec -np 2 ../../lmp_ubuntu < in.crack

Best regard,
Rizal

2010/12/10 John S <s.john634@…24…>

Makefile.ubuntu_parallel.txt (649 Bytes)

Makefile.ubuntu_serial.txt (2.25 KB)

The error is no mpi,h file. So you need to make
settings in the MPI section of the Makefile.g++.
The doc pages on building LAMMPS discuss this
the MPI settings in detail.

Steve

Dear All,

Thank you for your response.I am not using Ubuntu, it is RH Linux box, where I try to install Lammps .
By MPI settings , can you specify which you are referring to ,is it "Building LAMMPS as a library ".

Thank You
John

Dear Users,

I was able to compile and get my executable as lmp_serial.
The process was as :
cd src/STUBS
make
cd …
make serial
I used g++ as compiler in my Makefile.serial.

I am sorry to ask this , if someone can elaborate me on the compilation steps for the the parallel, where I need to make the changes in Makefile.linux.

Thank You
John

i just compiled it today on parallel.
i changed g++ to mpicxx in my Makefile, the school machine have mpi already, so mpicxx worked for me

Dear All,

Do you receive an error as below while installing lammps .I used make linux.
And made changes in my Makefile.linux as CC > mpiCC.

make[1]: Entering directory `/usr/local/lammps/lammps-7Dec10/src/Obj_linux’

mpiCC -O -DLAMMPS_GZIP -DMPICH_SKIP_MPICXX -DFFT_FFTW -c fft3d.cpp

fft3d.h(164): catastrophic error: could not open source file “fftw.h”

#include “fftw.h”

^

compilation aborted for fft3d.cpp (code 4)

make[1]: *** [fft3d.o] Error 4

make[1]: Leaving directory `/usr/local/lammps/lammps-7Dec10/src/Obj_linux’

make: *** [linux] Error 2

Can anybody point out what this is related to.
I thank all for the help.

John

Yes, use -DFFT_NONE
change -DFFT_FFTW to -DFFT_NONE

John,
Yixin’s fix will work if you don’t (immediately) intend on using a kspace solver for long-range coulombic interactions.

If you do, you’ll need to properly link to your FFT library (i.e. edit the ‘FFT_PATH =’ line), since it looks like your compiler can’t find it. Do you happen to know where that is?
Tyler

Dear All,

As Yixin said , it fixed my error and I got the executable.

At present I do not intend to use kspace for long range columbic interactions. I am not sure on how to link it to the FFT library ( I will see the documentation).I will appreciate if you would like to suggest on this.

I thank all for your help.

John.

Hey John,
Section 2.2.4 deals specifically with FFT library linking. After reading that, I also realized that what I told you was wrong. You’ll only need to link to an FFT library for the PPPM kspace solver (but that one does happen to be fastest for most large systems).

The documentation is pretty straightforward from there, although you may need to lookup documentation for whichever FFT library you use to specficy FFT_PATH.

Good luck!
Tyler