Help - Lammps installation on Ubuntu

Kumar, I am happy to help where I can, but please CC the LAMMPS mailing
list (as I have done) so others can also find that help in the future.

Have you edited the makefile(s) at all? I'm not precisely certain how
it's possible for you to get some of those errors if you are using the
same Makfile.openmpi that comes with LAMMPS. "-limf", for example, is
a reference to the Intel math libraries, which are intended to partially
replace the standard C math library ("-lm" includes that) when using the
Intel compilers. I am fairly certain none of those flags is included
anywhere in the LAMMPS distribution unless you or someone else put them
there.

You also seem to be using Makefile.openmpi but then compiling using
MPICH2; may be a recipe for failure. I've never tried it before, so I
don't know how or if that will work. "make linux" might, as an
alternative. I recommend OpenMPI instead of MPICH2 unless you have a
non-LAMMPS program that won't work with OpenMPI (and there's no reason
it wouldn't work with either one unless someone has done something
non-standard).

I posted the following message to the mailing list some months ago that
I have been told worked perfectly:
   http://lammps.sandia.gov/threads/msg23205.html
I assume you'd already seen that, though, or you wouldn't have know to
e-mail me in the first place. To re-cap, those instructions were:

   // First, download the distribution and unpack it; I will assume you
   // have placed it in $HOME/LAMMPS

   # apt-get install openmpi-bin openmpi-doc libopenmpi-dev fftw-dev
    module avail     module load openmpi // or whatever the name printed above was
    module initadd openmpi // if you want it EVERY TIME you start a shell     cd [path to LAMMPS build directory]
     // e.g., "cd HOME/LAMMPS/src"     make openmpi
    mkdir \-p \~/bin     cp lmp_openmpi ~/bin // copies it to a location in $PATH

If that doesn't work, I recommend consulting a local source to get some
help. It's very hard to find out exactly what you did otherwise.

Karl

Dear Dr. Hammond,

These are the instructions I followed for installation: cd /lammps-18Apr10/lib/reax
nedit README
make -f Makefile.gfortran
ls *.a
cd …/poems/
nedit README
make -f Makefile.g++
ls *.a
cd …/meam
nedit README
make -f Makefile.gfortran
ls *.a

cd …/…/src
make yes-reax
make yes-meam
make yes-poems
make
make openmpi

I even changed makefile.lammps in MEAM library to g++ instead of g++4.

When I do make linux, I get the following error:
~/lammps-21Mar12/src make linux
make[1]: Entering directory /home/vsmanem/lammps-21Mar12/src/Obj_linux' icc -O -DLAMMPS_GZIP -DLAMMPS_JPEG -I../../lib/poems -I../../lib/meam -I../../lib/reax -DMPICH_SKIP_MPICXX -DFFT_FFTW -c angle_charmm.cpp make[1]: icc: Command not found make[1]: *** [angle_charmm.o] Error 127 make[1]: Leaving directory /home/vsmanem/lammps-21Mar12/src/Obj_linux’
make: *** [linux] Error 2

When I do: make serial: $/home/lammps-1Dec10/src

make serial

It runs fine and I end up with the following:

size …/lmp_serial
text data bss dec hex filename
2479919 2068 1612281376 1614763363 603f5563 …/lmp_serial
make[1]: Leaving directory `/home/vsmanem/lammps-1Dec10/src/Obj_serial’

Does this mean that serial is working fine? Is there anything that I am missing with openmpi installation. Thanks a lot for your time.

With Regards,
Kumar.

I can now reproduce your error. I think it's a (perhaps unintended)
side-effect of a recent update to those files; the version I compiled
earlier this morning, which was LAMMPS (17 Feb 2012), went off without a
hitch. I ran an SVN update, however, and now I get the same problems with
linking.

The culprit is Makefile.lammps in the lib/reax directory, which is now a
copy of Makefile.lammps.ifort. If you issue
   cp Makefile.lammps.gfortran Makefile.lammps
it should fix the problem. At least, it does for me.

If anyone else reads this: does it make sense for the above copy command
to be issued as soon as the REAX library gets built (that is, inside
Makefile.gfortran, makefile.ifort, etc.)?

Good luck!

Karl D. Hammond
University of Tennessee, Knoxville
[email protected]

"You can never know everything, and part of what you know is always
   wrong. A portion of wisdom lies in knowing that. A portion of courage
   lies in going on anyway."
"Nothing ever goes as you expect. Expect nothing, and you will not be
   surprised."

Try to read and understand the error messages. For example you have the error “icc: Command not found”

This implies that the executable “icc” is either not installed in your computer or is not in your path. What you can then do is either edit your makefile to use “gcc” if it is installed and in your path or contact your system administrator.

Try compiling various software from thier source code which use makefiles if you are new to this. That will help a lot.

Best’
Manoj

The culprit is Makefile.lammps in the lib/reax directory, which is now a
copy of Makefile.lammps.ifort. If you issue
cp Makefile.lammps.gfortran Makefile.lammps
it should fix the problem. At least, it does for me.

If anyone else reads this: does it make sense for the above copy command
to be issued as soon as the REAX library gets built (that is, inside
Makefile.gfortran, makefile.ifort, etc.)?

I don't think so, b/c there is not a one-to-one
correspondence between the Makefile.foo and
Makefile.lammps.bar files. We provide several
of each, but it is up to the user to insure
he is using a lib/reax/Makefile.lammps that
is appropriate for his box or edit his own.

Steve