Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] openmpi+nag/5.1 error with libpthread
From: Brock Palen (brockp_at_[hidden])
Date: 2009-09-14 15:00:33


We built openmpi/1.3.2 with nagware 5.1, to make it build we used
the following options:

./configure --prefix=/home/software/rhel5/openmpi-1.3.2/nag-5.1 --with-
tm=/usr/local/torque --with-openib=/usr CC=gcc CXX=g++ FC=f95 F77=f95
FCFLAGS=-w -dusty --disable-shared --enable-static --mandir=/home/
software/rhel5/openmpi-1.3.2/nag-5.1/man/

Problem is the resulting link puts -lpthread before -lmpi, which is
out of order for linking (undefined pthread_atfork()).

Example:
mpif90 -showme
f95 -I/home/software/rhel5/openmpi-1.3.2/nag-5.1/include -lpthread -I/
home/software/rhel5/openmpi-1.3.2/nag-5.1/lib -L/usr/local/torque/lib -
L/home/software/rhel5/openmpi-1.3.2/nag-5.1/lib -lmpi_f90 -lmpi_f77 -
lmpi -lopen-rte -lopen-pal -libverbs -ltorque -ldl -Wl,--export-
dynamic -lnsl -lutil -lm -ldl

We modified (by hand) mpif90-wrapper-data.txt to change:

compiler_flags=-lpthread -> compiler_flags=

libs=-lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -libverbs -
ltorque -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl

->
libs=-lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -libverbs -
ltorque -ldl -Wl,--export-dynamic -lnsl -lutil -lpthread -lm -ldl

Which matches our builds for the PGI compilers, and linking works fine
now. Don't know why this happened, Just passing it along.

Brock Palen
www.umich.edu/~brockp
Center for Advanced Computing
brockp_at_[hidden]
(734)936-1985