Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] Fortran MPI module and gfortran
From: W Spector (w6ws_at_[hidden])
Date: 2014-03-30 14:43:41


Hi,

The mpi.mod file that is created from both the openmpi-1.7.4 and
openmpi-1.8rc1 tarballs does not seem to be generating interface blocks
for the Fortran API - whether the calls use choice buffers or not.

I initially tried the default gfortran on my system - 4.7.2. The
configure commands are:

export CC=gcc
export CXX=g++
export FC=gfortran
export F90=gfortran
./configure --prefix=/home/wws/openmpi_gfortran \
     --enable-mpi-fortran --enable-mpi-thread-multiple \
     --enable-mpirun-prefix-by-default \
     2>&1 | tee config.gfortran.out

The relevant configure output reads:

....
checking if building Fortran mpif.h bindings... yes
checking for Fortran compiler module include flag... -I
checking Fortran compiler ignore TKR syntax... not cached; checking variants
checking for Fortran compiler support of TYPE(*), DIMENSION(*)... no
checking for Fortran compiler support of !DEC$ ATTRIBUTES NO_ARG_CHECK... no
checking for Fortran compiler support of !$PRAGMA IGNORE_TKR... no
checking for Fortran compiler support of !DIR$ IGNORE_TKR... no
checking for Fortran compiler support of !IBM* IGNORE_TKR... no
checking Fortran compiler ignore TKR syntax... 0:real:!
checking if building Fortran 'use mpi' bindings... yes
checking if building Fortran 'use mpi_f08' bindings... no
....

I have also tried using a version of the 4.9 trunk that I generated from
a March 18th, 2014 snapshot of the gcc trunk. This latter compiler
supports some of the TS 29 features. (I set the latter by setting PATH
to find the 4.9 compilers first. I also set the F90 and FC environment
variables to point to the 4.9 compiler.)

make clean
export PATH=/usr/local/gcc-trunk/bin:$PATH
export CC=gcc
export CXX=g++
export FC=/usr/local/gcc-trunk/bin/gfortran
export F90=/usr/local/gcc-trunk/bin/gfortran
./configure --prefix=/home/wws/openmpi_gfortran49 \
     --enable-mpi-fortran --enable-mpi-thread-multiple \
     --enable-mpirun-prefix-by-default \
     2>&1 | tee config.gfortran49.out

The configure output is identical to the 4.7 compiler. Note that it did
NOT recognize that gfortran now supports the !GCC$ ATTRIBUTE
NO_ARG_CHECK directive, nor did it recognize that gfortran also accepts
'TYPE(*), DIMENSION(*)'.

I have also verified with strace that the proper mpi.mod file is being
accessed when I am trying to USE the mpi module.

I have not dug into the openmpi code yet. Just wondering if this is a
known problem before I start? Or did I do something wrong during configure?

Walter Spector