[Dune] Problem with lam/mpi

Stefan Vater vater at math.fu-berlin.de
Fri Oct 13 15:11:42 CEST 2006


Hi,

I installed DUNE on my linux system and had the following problem in 
conjunction with lam/mpi:

when I do a configure in dune-istl, the system seems to recognize well 
lam/mpi:
...
checking for mpicc... mpicc
checking for MPI_Init... yes
checking for mpi.h... yes
configure: Trying to identify the version of mpicc
checking for lam... yes
checking whether compiling with LAM >= 7.1 works... yes
checking whether running with LAM >= 7.1 works... yes
...

Configure also recognizes a library called pthreads:
...
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
...

But when I do a "make", I get the following error message:
...
make[4]: Entering directory 
`/home/vater/rechnen/dune/dune-istl/doc/comm'
if 
g++ -DHAVE_CONFIG_H -I. -I. -I../..  -I/home/vater/rechnen/dune/dune-common -I../..  -pthread -DMPIPP_H -DENABLE_MPI=1 -g -O2 -MT 
indexset-indexset.o -MD -MP -MF ".deps/indexset-indexset.Tpo" -c -o 
indexset-indexset.o `test -f 'indexset.cc' || echo './'`indexset.cc; \
then mv -f ".deps/indexset-indexset.Tpo" ".deps/indexset-indexset.Po"; 
else rm -f ".deps/indexset-indexset.Tpo"; exit 1; fi
/bin/sh ../../libtool --tag=CXX --mode=link 
g++  -g -O2 -L/home/vater/rechnen/dune/dune-common/common -lcommon  -o 
indexset  
indexset-indexset.o -llammpio -llamf77mpi -lmpi -llam -lutil -ldl
mkdir .libs
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
/usr/lib/libmpi.a(malloc.o): In function `ptmalloc_unlock_all':
(.text+0x6e8): undefined reference to `pthread_setspecific'
/usr/lib/libmpi.a(malloc.o): In function `ptmalloc_lock_all':
(.text+0x799): undefined reference to `pthread_getspecific'
/usr/lib/libmpi.a(malloc.o): In function `ptmalloc_lock_all':
(.text+0x7b3): undefined reference to `pthread_setspecific'
/usr/lib/libmpi.a(malloc.o): In function `ptmalloc_init':
(.text+0x93e): undefined reference to `pthread_key_create'
/usr/lib/libmpi.a(malloc.o): In function `ptmalloc_init':
(.text+0x953): undefined reference to `pthread_setspecific'
/usr/lib/libmpi.a(malloc.o): In function `ptmalloc_init':
(.text+0x96f): undefined reference to `pthread_atfork'
/usr/lib/libmpi.a(malloc.o): In function `free_atfork':
(.text+0x14a5): undefined reference to `pthread_getspecific'
/usr/lib/libmpi.a(malloc.o): In function `arena_get2':
(.text+0x2ca7): undefined reference to `pthread_mutex_trylock'
/usr/lib/libmpi.a(malloc.o): In function `arena_get2':
(.text+0x2cc5): undefined reference to `pthread_mutex_trylock'
/usr/lib/libmpi.a(malloc.o): In function `arena_get2':
(.text+0x2cf4): undefined reference to `pthread_setspecific'
/usr/lib/libmpi.a(malloc.o): In function `arena_get2':
(.text+0x2d51): undefined reference to `pthread_setspecific'
/usr/lib/libmpi.a(malloc.o): In function `pvalloc':
(.text+0x2d9d): undefined reference to `pthread_getspecific'
/usr/lib/libmpi.a(malloc.o): In function `pvalloc':
(.text+0x2dab): undefined reference to `pthread_mutex_trylock'
/usr/lib/libmpi.a(malloc.o): In function `valloc':
(.text+0x2e44): undefined reference to `pthread_getspecific'
/usr/lib/libmpi.a(malloc.o): In function `valloc':
(.text+0x2e52): undefined reference to `pthread_mutex_trylock'
/usr/lib/libmpi.a(malloc.o): In function `malloc':
(.text+0x2ef9): undefined reference to `pthread_getspecific'
/usr/lib/libmpi.a(malloc.o): In function `malloc':
(.text+0x2f07): undefined reference to `pthread_mutex_trylock'
/usr/lib/libmpi.a(malloc.o): In function `memalign':
(.text+0x3031): undefined reference to `pthread_getspecific'
/usr/lib/libmpi.a(malloc.o): In function `memalign':
(.text+0x303f): undefined reference to `pthread_mutex_trylock'
/usr/lib/libmpi.a(malloc.o): In function `realloc':
(.text+0x325b): undefined reference to `pthread_setspecific'
/usr/lib/libmpi.a(malloc.o): In function `malloc_atfork':
(.text+0x34b3): undefined reference to `pthread_getspecific'
/usr/lib/libmpi.a(malloc.o): In function `independent_comalloc':
(.text+0x37a1): undefined reference to `pthread_getspecific'
/usr/lib/libmpi.a(malloc.o): In function `independent_comalloc':
(.text+0x37af): undefined reference to `pthread_mutex_trylock'
/usr/lib/libmpi.a(malloc.o): In function `independent_calloc':
(.text+0x381b): undefined reference to `pthread_getspecific'
/usr/lib/libmpi.a(malloc.o): In function `independent_calloc':
(.text+0x3829): undefined reference to `pthread_mutex_trylock'
/usr/lib/libmpi.a(malloc.o): In function `calloc':
(.text+0x38aa): undefined reference to `pthread_getspecific'
/usr/lib/libmpi.a(malloc.o): In function `calloc':
(.text+0x38bc): undefined reference to `pthread_mutex_trylock'
/usr/lib/liblam.a(lammutex.o): In function `lam_mutex_trylock':
(.text+0xf4): undefined reference to `pthread_mutex_trylock'
/usr/lib/liblam.a(lamthreads.o): In function `lam_thread_create':
(.text+0x73): undefined reference to `pthread_create'
/usr/lib/liblam.a(lamthreads.o): In function `lam_thread_join':
(.text+0x25): undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make[4]: *** [indexset] Fehler 1
make[4]: Leaving directory `/home/vater/rechnen/dune/dune-istl/doc/comm'

It seams that the -pthread flag is not added in the Makefile at the 
right place, because writing the line

MAKE_FLAGS="LDFLAGS=-pthread"

in my options file for dunecontrol, everthing works fine. Should not the 
system recognize by itself that it needs pthreads??? 

You also have a strange comment on the news-webpage 
(http://www.dune-project.org/news/):
Under "YaspGrid - reference implementation of the parallel grid 
interface", one can read: "If you want to use the parallel interface 
you must have an MPI implementation available (automake can detect 
mpich and lam). To learn how to compile your DUNE project with MPI 
support have a look at  dune-tutorial/Makefile.am."

I could not find "dune-tutorial/Makefile.am" anywhere in the code...

Best regards,
Stefan

P.S.: Attached I send you my config.log configure wrote in this run.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: text/x-log
Size: 85770 bytes
Desc: not available
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20061013/771cfa79/attachment.bin>


More information about the Dune mailing list