Building the linux version

Hello,

I am trying to build LAMMPS on the ubuntu flavor of linux. I have installed FFTW, Intel ICC, and MPICH2 in order to run it. I finally tackled all the library issues I was having, and am now stumped by a new problem.

At first it was telling me it couldn't find Makefile.package.settings, and then that it had no directions for making the target. I solved that by downloading the new version of LAMMPS (again) and copying all the Make files in the main src directory to the directory I was building in. Now I'm having trouble with it saying that it cannot open mpi.h and fftw.h, and then I get a series of errors I don't understand. Please see the errors listed below.

I am trying to make LAMMPS using the standard packages plus ATC. I've confirmed that the mpi.h file is in the directory, but don't know why it says it cannot open it.

Thank you for your help,
Laura

icc -O -DLAMMPS_GZIP -DLAMMPS_JPEG -I../../lib/reax -I../../lib/poems -I../../lib/meam -DMPICH_SKIP_MPICXX -DFFT_FFTW -M remap_wrap.cpp > remap_wrap.d
remap.h(14): catastrophic error: cannot open source file "mpi.h"
   #include <mpi.h>
                   ^

icc -O -DLAMMPS_GZIP -DLAMMPS_JPEG -I../../lib/reax -I../../lib/poems -I../../lib/meam -DMPICH_SKIP_MPICXX -DFFT_FFTW -M pppm_gpu.cpp > pppm_gpu.d
fft3d.h(212): catastrophic error: cannot open source file "fftw.h"
   #include "fftw.h"
                    ^
icc -O -DLAMMPS_GZIP -DLAMMPS_JPEG -I../../lib/reax -I../../lib/poems -I../../lib/meam -DMPICH_SKIP_MPICXX -DFFT_FFTW -c compute_heatflux_atom.cpp
compute_heatflux_atom.cpp(38): error #165: too few arguments in function call
     if (narg != 6) error->all("Illegal compute heatflux/atom command");
                                                                      ^

compute_heatflux_atom.cpp(64): error #165: too few arguments in function call
       error->all("Could not find compute heatflux/atom compute ID");
                                                                   ^

compute_heatflux_atom.cpp(66): error #165: too few arguments in function call
       error->all("Compute heatflux/atom compute ID does not compute ke/atom");
                                                                             ^

compute_heatflux_atom.cpp(68): error #165: too few arguments in function call
       error->all("Compute heatflux/atom compute ID does not compute pe/atom");
                                                                             ^

compute_heatflux_atom.cpp(70): error #165: too few arguments in function call
       error->all("Compute heatflux/atom compute ID does not compute stress/atom");
                                                                                  ^

compute_heatflux_atom.cpp(96): error #165: too few arguments in function call
       error->all("Could not find compute heatflux/atom compute ID");
                                                                   ^

compilation aborted for compute_heatflux_atom.cpp (code 2)
make[1]: *** [compute_heatflux_atom.o] Error 2
make[1]: Leaving directory `/home/laura/mylammps/src/Obj_linux'
make: *** [linux] Error 2

Hello,

I am trying to build LAMMPS on the ubuntu flavor of linux. I have
installed FFTW, Intel ICC, and MPICH2 in order to run it. I finally
tackled all the library issues I was having, and am now stumped by a
new problem.

At first it was telling me it couldn't find Makefile.package.settings,
and then that it had no directions for making the target. I solved
that by downloading the new version of LAMMPS (again) and copying all
the Make files in the main src directory to the directory I was
building in. Now I'm having trouble with it saying that it cannot open
mpi.h and fftw.h, and then I get a series of errors I don't
understand. Please see the errors listed below.

I am trying to make LAMMPS using the standard packages plus ATC. I've
confirmed that the mpi.h file is in the directory, but don't know why
it says it cannot open it.

because you don't tell the compiler/preprocessor where to find those files.
that is what the -I flag is for. please read the compiler documentation
and/or talk to somebody local with experience in compiling software.
it is a trivial thing and once you've understood it you will be embarrassed
that you didn't get it before.

cheers,
    axel.

Dear Laura,

I can send you a makefile that I adjusted for ubuntu earlier, let me know if you need it.

With best wishes,
Anna

Hello Anna,

That would be great. Thank you so much.

Laura

Quoting Anna Lappala <[email protected]...>:

compute_heatflux_atom.cpp(64): error #165: too few arguments in function call
     error->all("Could not find compute heatflux/atom compute ID");

The mpi.h path must be solved first in the "settings" part of
your Makefile.foo.

But this error above is coming from a file I don't recognize.
It's error calls are out of date with current LAMMPS. What
file is compute_heatflux_atom.cpp ?? Is it in some package
I'm not remembering?

Steve

Hello Laura,

I am sending an mpi version as an attachment. Apologies for the delay! this is what works for me on Ubuntu. Let me know if you cannot build it!

with best wishes,
Anna

Makefile.openmpi (2.58 KB)