Hi,

I'm on a AMD64 box (Linux quartic.txcorp.com 2.6.19-1.2288.fc5 #1 SMP Sat Feb 10 14:59:35 EST 2007 x86_64 x86_64 x86_64 GNU/Linux) and compiled openmpi-1.2.4 using the Lahey-Fujitsu compiler (lfc). The compilation of openmpi went fine.

$ ../configure --enable-mpi-f90 --enable-mpi-f77 --enable-mpi-cxx --prefix=/home/research/pletzer/local/x86_64/openmpi-1.2.4/ FC=lfc F77=lfc FCFLAGS=-O2 FFLAGS=-O2 --disable-shared --enable-static

However, when compiling a test code with mpif90, I get the following error:

[pletzer@quartic test]$ cat t.f90
program test
 implicit none
 include 'mpif.h'
 integer :: rank, size, ier
 call mpi_init(ier)
 call mpi_comm_rank(MPI_COMM_WORLD, rank, ier)
 call mpi_comm_size(MPI_COMM_WORLD, size, ier)
 print *,'rank ', rank, ' size ', size
 call mpi_finalize(ier)
end program test

[pletzer@quartic test]$ mpif90 t.f90
Encountered 0 errors, 0 warnings in file t.f90.
/home/research/pletzer/local/x86_64/openmpi-1.2.4//lib/libopen-pal.a(lt1-malloc.o): In function `ptmalloc_init':
malloc.c:(.text+0x4b71): undefined reference to `pthread_atfork'
[pletzer@quartic test]$

I know this symbol is defined in

[pletzer@quartic test]$ nm /usr/lib64/libpthread.a | grep pthread_atfork
..
0000000000000000 T pthread_atfork

However linking with this library does not resolve the problem:

[pletzer@quartic test]$ mpif90 t.f90 /usr/lib64/libpthread.a
Encountered 0 errors, 0 warnings in file t.f90.
/home/research/pletzer/local/x86_64/openmpi-1.2.4//lib/libopen-pal.a(lt1-malloc.o): In function `ptmalloc_init':
malloc.c:(.text+0x4b71): undefined reference to `pthread_atfork'

Thanks for your help.

--Alex

--
Alexander Pletzer
Tech-X (p) 303 - 996 2031 (c) 609 235 6022 (f) 303 448 7756

Reply via email to