[Dune] Installation problem

Christian Engwer christi at uni-hd.de
Fri Jul 21 17:01:55 CEST 2006


Hi,

> I try to install a parallel version dune on a cluster with alugrid 0.3, metis 4.0 and parmetis 3.1.
> 
> During the "dunecontrol all" process i get the following error:
> ...
> g++ -g -O2 -o integration integration-integration.o -DUSE_STDARG -DHAVE_STDLIB_H
> =1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DUSE_STDARG=1 -DMALLOC
> _RET_VOID=1 -march=opteron -m64 -DUSE_STDARG -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
>  -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DUSE_STDARG=1 -DMALLOC_RET_VOID=1 -march=o
> pteron -m64 -DUSE_STDARG -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -
> DHAVE_STDARG_H=1 -DUSE_STDARG=1 -DMALLOC_RET_VOID=1 -march=opteron -m64  -L/home
> 2/leidenberger/dune/dune-common/common -L/home2/leidenberger/dune/dune-grid/grid
>  /home2/leidenberger/dune/dune-common/common/.libs/libcommon.a /home2/leidenberg
> er/dune/dune-grid/grid/.libs/libgrid.a -L/opt/mpi/mpich-1.2.7-opteron/lib -L/hom
> e2/leidenberger/extlib/ParMetis-3.1 -L/home2/leidenberger/extlib/ALUGrid-0.3/lib
>  -lparmetis /home2/leidenberger/extlib/ALUGrid-0.3/lib/libalugrid.a -L/home2/lei
> denberger/extlib/metis-4.0 -lmetis -lmpich -lpthread -lrt
> /home2/leidenberger/extlib/ALUGrid-0.3/lib/libalugrid.a(alugrid_parallel.o)(.gnu
> .linkonce.r._ZTVN3MPI2OpE+0x20): undefined reference to `MPI::Op::Init(void (*)(
> void const*, void*, int, MPI::Datatype const&), bool)'
> /home2/leidenberger/extlib/ALUGrid-0.3/lib/libalugrid.a(alugrid_parallel.o)(.gnu
> .linkonce.r._ZTVN3MPI2OpE+0x28): undefined reference to `MPI::Op::Free()'
> /home2/leidenberger/extlib/ALUGrid-0.3/lib/libalugrid.a(alugrid_parallel.o)(.gnu
> .linkonce.t._ZN4PMPI7Request4WaitEv+0x7): In function `PMPI::Request::Wait()':
> /opt/mpi/mpich-1.2.7-opteron/include/mpi2c++/request_inln.h:46: undefined refere
> nce to `PMPI::Request::ignored_status'
> ...
> (total message in appendix)
> 
> I think there is an problem with mpi and alugrid, but I have no idea where it comes form or how to fix it.
> 
> Can somebody give me a hit?

There is a problem with MPI ;-)

The problem is common to all mpi versions I have seen so far:
If you use the MPI_CPPFLAGS and MPI_LDFLAGS that the mpicc uses you
will you would assume that the program you crate only uses the C
interface of MPI. But that is not true. If you include mpi.h and you
are using a C++ compiler MPI implicitely includes the c++ headers as
well. This leads to the unresolved symbols.

I just added a helper script that allows you to determin the necessary
mpi parameters for alugrid and updated the installation guide
accordingly:

./configure --prefix=/directory/to/install/ALUGrid/to \
   CXX=g++-3.4 CC=gcc-3.4 \
   CPPFLAGS="mpi-config --cflags --disable-cxx --mpicc=/opt/foo-mpi/bin/mpicc" \
   LDFLAGS="mpi-config --libs --disable-cxx --mpicc=/opt/foo-mpi/bin/mpicc" 

using the mpi-config script from dune-common/bin you can determin the
compiler flags used by the $MPICC mpi compiler script.

This should fix your problem.

Hope I could help you :-)

Cheers Christian




More information about the Dune mailing list