[Dune] Problem with lam/mpi

Stefan Vater vater at math.fu-berlin.de
Tue Oct 17 09:47:29 CEST 2006


Am Montag, 16. Oktober 2006 19:03 schrieb Christian Engwer:
> 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
Hi Christian,

when I applied the patch, everything seems to work. I also did a "make 
clean" in every dune-module (dune-common, dune-grid etc.) to be sure 
that nothing was left from the old runs.

The part, which did not work before, reads now:
g++ -g -O2 -o indexset 
indexset-indexset.o -pthread -DMPIPP_H -DENABLE_MPI=1  -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

and has a -pthread in it.

By the way: Is there a possibility to use dunecontrol
- just to install one module (e.g. dune-istl)?
- to clean up all dune-modules?
- to switch off mpi, even when it is correctly installed?

Regards,
Stefan

-- 
------------------------------------------------------------------------
 Stefan Vater                        |  Phone: +49 (30) 838-75201
 Freie Universität Berlin            |  Fax:   +49 (30) 838-54977
 Department of Mathematics and       |  e-mail: vater at math.fu-berlin.de
 Computer Science                    |
 Institute of Mathematics II, WE 2   |
 Arnimallee 2-6, D-14195 Berlin      |
------------------------------------------------------------------------
 URL:  http://www.math.fu-berlin.de/~vater/
------------------------------------------------------------------------




More information about the Dune mailing list