[lammps-users] trouble installing LAMMPS with MPICH2

Hi all LAMMPS users,

So I’m quite new to LAMMPS, and have been struggling for the past couple days to get it properly installed! I plan on running jobs on parallel processors, so have installed MPICH2. The problem comes when linking the MPICH2 libraries to lammps…it doesn’t want to recognize variables such as MPI_Bcast etc, giving me an error output that looks like:

Hi all LAMMPS users,



/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
. + a whole bunch more...
collect2: ld returned 1 exit status

In investigating this, I've found that the problem lies in the fact
that MPICH was compiled using fortran (g77), but lammps uses
g++. I was told it might be possible to create a separate library to


this has nothing to do with g77. some people may be confused,
because similar linking errors happen if you try linking some
implementations agains a version compiled against a different
fortran compiler (or following its "underscoring conventions").

in the simplest case, you just didn't link with the mpi libraries
properly. please post your make settings.

if the makefile would be correct, that it could be one of these
"framework" issues, i.e. something due to the (strange to me)
ways how MacOS tries to separate system libraries from user
supplied libraries.

so did you compile MPICH yourself or was it bundled with your
machine? did you try to compile/run some of the MPI test/benchmark
examples (in c/c++ of course)? those have to work, before
you can deal with a more complicated application like LAMMPS.