Openmpi-1.3 and PGI 9.0-1

I am trying to compile. Any suggestions should be helpful.

Configure line

./configure --prefix=/shared/ben/openmpi-1.3 CC=pgcc CXX=pgCC FC=pgf77 F90=pgf90

Error:

*** Fortran 77 compiler
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... no
checking whether gfortran accepts -g... yes
checking if Fortran 77 compiler works... no
**********************************************************************
* It appears that your Fortran 77 compiler is unable to produce working
* executables.  A simple test application failed to properly
* execute.  Note that this is likely not a problem with Open MPI,
* but a problem with the local compiler installation.  More
* information (including exactly what command was given to the
* compiler and what error resulted when the command was executed) is
* available in the config.log file in this directory.
**********************************************************************
configure: error: Could not run a simple Fortran 77 program.  Aborting.

This configure “works” in that configure completes sucessfully.

./configure CC=pgcc CXX=pgCC F77=pgf77 F90=pgf90 -prefix=/shared/ben/openmpi-1.3

I then run make and get:

/bin/sh ../../../libtool   --mode=link pgfortran -I../../../ompi/include -I../../../ompi/include -I. -I. -I../../../ompi/mpi/f90    -export-dynamic   -o libmpi_f90.la -rpath /shared/ben/openmpi-1.3/lib mpi.lo mpi_sizeof.lo mpi_comm_spawn_multiple_f90.lo mpi_testall_f90.lo mpi_testsome_f90.lo mpi_waitall_f90.lo mpi_waitsome_f90.lo mpi_wtick_f90.lo mpi_wtime_f90.lo   ../../../ompi/libmpi.la -lnsl -lutil  -lpthread
libtool: link: pgfortran -shared  .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    -rpath /shared/ben/benchmarking/benchmark_distro/openmpi-1.3/ompi/.libs -rpath /shared/ben/benchmarking/benchmark_distro/openmpi-1.3/orte/.libs -rpath /shared/ben/benchmarking/benchmark_distro/openmpi-1.3/opal/.libs -rpath /shared/ben/openmpi-1.3/lib -L/shared/ben/benchmarking/benchmark_distro/openmpi-1.3/orte/.libs -L/shared/ben/benchmarking/benchmark_distro/openmpi-1.3/opal/.libs ../../../ompi/.libs/libmpi.so /shared/ben/benchmarking/benchmark_distro/openmpi-1.3/orte/.libs/libopen-rte.so /shared/ben/benchmarking/benchmark_distro/openmpi-1.3/opal/.libs/libopen-pal.so -ldl -lnsl -lutil -lpthread    -soname libmpi_f90.so.0 -o .libs/libmpi_f90.so.0.0.0
/usr/bin/ld: .libs/mpi_comm_spawn_multiple_f90.o: relocation R_X86_64_PC32 against undefined symbol `mpi_comm_spawn_multiple_' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
make[4]: *** [libmpi_f90.la] Error 2
make[4]: Leaving directory `/shared/ben/benchmarking/benchmark_distro/openmpi-1.3/ompi/mpi/f90'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/shared/ben/benchmarking/benchmark_distro/openmpi-1.3/ompi/mpi/f90'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/shared/ben/benchmarking/benchmark_distro/openmpi-1.3/ompi/mpi/f90'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/shared/ben/benchmarking/benchmark_distro/openmpi-1.3/ompi'
make: *** [all-recursive] Error 1

Hi bmayer,

Try using the following configure:

./configure CC=pgcc CXX=pgCC FC=pgf77 F90=pgf90 --prefix=/shared/ben/openmpi-1.3

libtool doesn’t yet recognize our new pgfortran driver so is using the default GNU link options. Why your configure is picking up pgfortran, is unclear. Most likely you have “FC” set to “pgfortran” in you environment.

Note we have instructions on how to build OpenMPI at http://www.pgroup.com/resources/openmpi/openmpi132_pgi90.htm.

Hope this helps,
Mat

Thank you for the reply.

I am getting:

*** Fortran 77 compiler
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... no
checking whether gfortran accepts -g... yes
checking if Fortran 77 compiler works... no
**********************************************************************
* It appears that your Fortran 77 compiler is unable to produce working
* executables.  A simple test application failed to properly
* execute.  Note that this is likely not a problem with Open MPI,
* but a problem with the local compiler installation.  More
* information (including exactly what command was given to the
* compiler and what error resulted when the command was executed) is
* available in the config.log file in this directory.
**********************************************************************
configure: error: Could not run a simple Fortran 77 program.  Aborting.

I needed to logout, log back in and the following command worked:

./configure CC=pgcc CXX=pgCC FC=pgf90 F90=pgf90 --prefix=/shared/ben/openmpi-1.3.3

Thank you for the idea that one of the environment variables was messing it up.