Hi Jalel, list
This is a libtool problem, I was told.
I had the same problem with PGI 8.0-4 and OpenMPI 1.2.8 to 1.3.2
(I haven't tried 1.3.3. yet).
From what you say, apparently the problem is still there on OpenMPI
1.3.3, PGI 9.0-1, and whatever libtool you have in your system.
The workaround suggested by the OpenMPI developer (Jeff) then was
to make a fake pgf90 (pgf95 in your case) command that would
strip off the -pthread flag, which actually was inserted by libtool,
and was not really being used (AFAIK), and is not a PGI flag.
My script for that goes like this
#! /bin/bash
####################################
# Ugly thing to strip off the
# -pthread flag and fix the
# OpenMPI 1.3 build.
# According to Jeff Squires this
# flag is introduced by a bug in
# libtool
# Gus Correa, 20090331
####################################
newargs=`echo $@ | sed s/-pthread//g -`
$path-to-pgi/bin/pgf90 $newargs
exit
Replace $path-to-pgi by your real path to PGI, pgf90 by pgf95,
put the script in, say, your bin directory,
change permissions to make it executable,
and make sure your bin directory appears before
the standard PGI bin directory in your PATH
(to override the actual PGI compiler).
See this thread:
http://www.open-mpi.org/community/lists/users/2009/04/8724.php
I hope this helps,
Gus Correa
---------------------------------------------------------------------
Gustavo Correa
Lamont-Doherty Earth Observatory - Columbia University
Palisades, NY, 10964-8000 - USA
---------------------------------------------------------------------
Jalel Chergui (LIMSI-CNRS) <jalel.cher...@limsi.fr> wrote:
Hello,
Trying to link OpenMPI-1.3.3 with PGI 9.0-1 and got the following error :
# ./configure --prefix=/opt/ofed/mpi/pgi/openmpi-1.3.3 --with-openib=/opt/ofed
FC=pgf95 CC=gcc CXX=g++
# make
[...]
libtool: link: pgf95 -shared -fpic -Mnomain .libs/mpi.o .libs/mpi_sizeof.o
.libs/mpi_comm_spawn_multiple_f90.o .libs/mpi_testall_f90.o
.libs/mpi_testsome_f90.o .libs/mpi_waitall_f90.o .libs/mpi_waitsome_f90.o
.libs/mpi_wtick_f90.o .libs/mpi_wtime_f90.o -Wl,-rpath
-Wl,/usr/local/src/openmpi-1.3.3/ompi/.libs -Wl,-rpath
-Wl,/usr/local/src/openmpi-1.3.3/orte/.libs -Wl,-rpath
-Wl,/usr/local/src/openmpi-1.3.3/opal/.libs -Wl,-rpath
-Wl,/opt/ofed/mpi/pgi/openmpi-1.3.3/lib
-L/usr/local/src/openmpi-1.3.3/orte/.libs
-L/usr/local/src/openmpi-1.3.3/opal/.libs ../../../ompi/.libs/libmpi.so
/usr/local/src/openmpi-1.3.3/orte/.libs/libopen-rte.so
/usr/local/src/openmpi-1.3.3/opal/.libs/libopen-pal.so -ldl -lnsl -lutil -lm
-pthread -Wl,-soname -Wl,libmpi_f90.so.0 -o .libs/libmpi_f90.so.0.0.0
pgf95-Error-Unknown switch: -pthread
make[4]: *** [libmpi_f90.la] Error 1
make[4]: Leaving directory `/usr/local/src/openmpi-1.3.3/ompi/mpi/f90'
[...]
# uname -a
Linux turing.limsi.fr 2.6.9-42.0.2.ELsmp #1 SMP Wed Aug 23 13:38:27 BST 2006
x86_64 x86_64 x86_64 GNU/Linux
It seems configure missed -l switch before pthread string. Is there any
workarround for
that. Thanks a lot for your help.
Jalel