[Dune] Problem with lam/mpi

Stefan Vater vater at math.fu-berlin.de
Tue Oct 17 10:01:31 CEST 2006


Hi,

Am Montag, 16. Oktober 2006 21:41 schrieb Markus Blatt:
> > 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
>
> Would you please try whether the following succeeds in
> dune-common/common:
>

Probably, you mean: dune-istl/doc/comm ???

> 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 -llamf77mpi -lmpi \
> -llam -lutil -ldl
>
When I apply your command in dune-istl/doc/comm, I get again:
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 -llamf77mpi -lmpi \
> -llam -lutil -ldl
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `ptmalloc_unlock_all':
(.text+0x6e8): undefined reference to `pthread_setspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `ptmalloc_lock_all':
(.text+0x799): undefined reference to `pthread_getspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `ptmalloc_lock_all':
(.text+0x7b3): undefined reference to `pthread_setspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `ptmalloc_init':
(.text+0x93e): undefined reference to `pthread_key_create'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `ptmalloc_init':
(.text+0x953): undefined reference to `pthread_setspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `ptmalloc_init':
(.text+0x96f): undefined reference to `pthread_atfork'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `free_atfork':
(.text+0x14a5): undefined reference to `pthread_getspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `arena_get2':
(.text+0x2ca7): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `arena_get2':
(.text+0x2cc5): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `arena_get2':
(.text+0x2cf4): undefined reference to `pthread_setspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `arena_get2':
(.text+0x2d51): undefined reference to `pthread_setspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `pvalloc':
(.text+0x2d9d): undefined reference to `pthread_getspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `pvalloc':
(.text+0x2dab): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `valloc':
(.text+0x2e44): undefined reference to `pthread_getspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `valloc':
(.text+0x2e52): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `malloc':
(.text+0x2ef9): undefined reference to `pthread_getspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `malloc':
(.text+0x2f07): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `memalign':
(.text+0x3031): undefined reference to `pthread_getspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `memalign':
(.text+0x303f): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `realloc':
(.text+0x325b): undefined reference to `pthread_setspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `malloc_atfork':
(.text+0x34b3): undefined reference to `pthread_getspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `independent_comalloc':
(.text+0x37a1): undefined reference to `pthread_getspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `independent_comalloc':
(.text+0x37af): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `independent_calloc':
(.text+0x381b): undefined reference to `pthread_getspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `independent_calloc':
(.text+0x3829): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `calloc':
(.text+0x38aa): undefined reference to `pthread_getspecific'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../libmpi.a(malloc.o): In 
function `calloc':
(.text+0x38bc): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../liblam.a(lammutex.o): In 
function `lam_mutex_trylock':
(.text+0xf4): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../liblam.a(lamthreads.o): In 
function `lam_thread_create':
(.text+0x73): undefined reference to `pthread_create'
/usr/lib/gcc/i586-suse-linux/4.1.0/../../../liblam.a(lamthreads.o): In 
function `lam_thread_join':
(.text+0x25): undefined reference to `pthread_join'
collect2: ld returned 1 exit status

> I just asked for the output of mpiCC -showme:link previuously, but
> the more interesting seems to be the ouput of
>
> mpicc -showme:link
This gives me pretty much the same as the one before:
vater at linux:~/rechnen/dune> mpicc -showme:link
-llammpio -llamf77mpi -lmpi -llam -lutil -ldl
>
> (Probably you have static libs here?)
>
> Markus

I hope, that helps a little bit!

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