[mpich-discuss] linking error in moab

Dave Goodell goodell at mcs.anl.gov
Mon Jun 4 23:18:35 CDT 2012


On Jun 4, 2012, at 7:49 PM CDT, Iulian Grindeanu wrote:

> p3.cpp
> iulian at T520-iuli:~/tmp$ more p3.cpp 
> #include <mpi.h>
> 
> int main (int argc, char * argv[] )
> {
>   MPI::Init(argc, argv);
>   MPI::Finalize();
>   return 0;
> }
> iulian at T520-iuli:~/tmp$ 

That's a pretty simple test program in which I can't see anything obviously wrong.

> If I am using my built version of mpich2, I get the same linking error. Although, in MOAB, we are not using MPI:: style, only MPI_xxx (c style)
> mpicxx p3.cpp 
> /home/iulian/3rdparty/lib/mpich2/lib/libmpich.so: undefined reference to `MPL_trfree'
[snip]
> `MPL_trDebugLevel'

This Debian bug seems related: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653616

> /home/iulian/3rdparty/lib/mpich2/lib/libmpich.so: undefined reference to `MPL_trid'
> collect2: ld returned 1 exit status
> iulian at T520-iuli:~/tmp$ mpich2version
> MPICH2 Version:        1.4.1p1
> MPICH2 Release date:    Thu Sep  1 13:53:02 CDT 2011
> MPICH2 Device:        ch3:nemesis
> MPICH2 configure:     --enable-sharedlibs=gcc --enable-shared --with-pm=mpd:gforker --enable-totalview --enable-mpe --enable-fc --enable-f77 --enable-cxx --prefix=/home/iulian/3rdparty/lib/mpich2
> MPICH2 CC:     gcc    -O2
> MPICH2 CXX:     g++   -O2
> MPICH2 F77:     gfortran   -O2
> MPICH2 FC:     f95   -O2

I'd rather debug this build, since it has a much simpler configuration than the earlier one you posted.  I don't see anything odd here.

> iulian at T520-iuli:~/tmp$ mpicxx -show
> g++ -I/home/iulian/3rdparty/lib/mpich2/include -L/home/iulian/3rdparty/lib/mpich2/lib -Wl,-rpath -Wl,/home/iulian/3rdparty/lib/mpich2/lib -lmpichcxx -lmpich -lopa -lmpl -lrt -lpthread

Same here, nothing obviously out of place.  What output do you get from "ldd $HOME/3rdparty/lib/mpich2/lib/*.so"?

Does reconfiguring mpich2 with "--enable-lib-depend" fix the problem?  I think this option was removed in 1.5a1 and later, but should still be present in 1.4.1p1.

What output do you get from "mpicxx -Wl,--version"?  I have no idea which distributions may have started using the gold linker by default, or possibly you've chosen to install it instead.  A non-GNU-ld linker might be the reason that I can't reproduce this on my end.

What does "env | grep '^LD'" give you?

-Dave



More information about the mpich-discuss mailing list