[Dune] Problem with lam/mpi
Markus Blatt
Markus.Blatt at ipvs.uni-stuttgart.de
Mon Oct 16 21:24:30 CEST 2006
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:
> g++ -g -O2 -o indexset
> indexset-indexset.o -L/home/vater/rechnen/dune/dune-common/common \
> /home/vater/rechnen/dune/dune-common/common/.libs/libcommon.a \
> /usr/lib/libstdc++.so -lm -lc -lgcc_s -llammpio \
> /usr/lib/liblamf77mpi.a /usr/lib/libmpi.a /usr/lib/liblam.a -lutil -ldl
Really weired!
Markus
More information about the Dune
mailing list