[Dune] Problem with lam/mpi

Christian Engwer christi at uni-hd.de
Tue Oct 17 10:36:03 CEST 2006


Hi Markus,

On Mon, Oct 16, 2006 at 09:24:30PM +0200, Markus Blatt wrote:
> On Mon, Oct 16, 2006 at 07:03:36PM +0200, Christian Engwer wrote:
> > Hi Stefan,
> > 
> > > There is nothing about libmpi in there. Actually, a "grep -R libmpi *" 
> > > in my dune root directory (where dune-common, etc. is in there) gave me 
> > > nothing.
> > 
> > After looking at your Makefile I have got an idea about what might be
> > the problem :-)
> > 
> > I think the problem is the following:
> > 
> > MPI_CPPFLAGS includes a '-pthread' which means "compile with pthread
> > support", but this information is missing in the linker command. This
> > problem arises, because the result of 'mpi-config --cflags' are the
> > CFLAGS (respective the CXXFLAGS) and not the CPPFLAGS. The CPPFLAGS
> > are only used when compiling, the CXXFLAGS are used for compiling and
> > linking.
> > 
> > The right fix would be be to change MPI_CPPFLAGS to MPI_CFLAGS and
> > MPI_CXXFLAGS and change the Makefile.am files accordingly.
> 
> First of all: It works for TM with lam-mpi 7.1.2, so this seems to be
> an issue of older versions (Stefan is using 7.1.1).
> 
> Even if your fix work, I would like to know why the hell the linker
> thinks it has link against the static libraries
> /usr/lib/liblamf77mpi.a /usr/lib/libmpi.a /usr/lib/liblam.a even
> though neither an environment variable nor the Makefile tells him so:

I would suspect a libtoll .la file to tell him to use the .a
file. When using libtool, you can yust write -lfoo -L/libfoopath/,
just as if you would be using shared libs.

Cheers Christian




More information about the Dune mailing list