[Dune] Problem with lam/mpi
Christian Engwer
christi at uni-hd.de
Mon Oct 16 19:03:36 CEST 2006
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.
In order to verify my idea, could you please apply the attached patch
to your dune_mpi.m4 in dune-common/m4 and the den run 'dunecontrol
all' again? I just patched the configure test to append the
MPI_CPPFLAGS to the MPI_LDFLAGS.
Thanks Christian
-------------- next part --------------
Index: dune_mpi.m4
===================================================================
--- dune_mpi.m4 (revision 4733)
+++ dune_mpi.m4 (working copy)
@@ -91,6 +91,7 @@
MPI_CONFIG()
MPI_CPPFLAGS="$MPI_CPPFLAGS $MPI_NOCXXFLAGS -DENABLE_MPI=1"
+ MPI_LDFLAGS="$MPI_CPPFLAGS $MPI_LDFLAGS"
with_mpi="yes ($MPI_VERSION)"
],[
More information about the Dune
mailing list