Cisco Blogs

MPI-3 Fortran bindings prototype now available

- February 27, 2012 - 0 Comments

At long last, Craig Rasmussen (from Los Alamos National Laboratory) and I are ready to publish our prototype implementation of the MPI-3 Fortran bindings.  The new MPI-3 Fortran bindings are coming up for their second vote at the upcoming MPI Forum meeting in Chicago; this public release satisfies the “must implement all new proposed behavior” requirement for proposals to get in MPI-3.

The good stuff:

Please download and give this implementation a whirl! We’d love to hear your feedback.

So let’s dive a little deeper into the details…

This implementation completely revamps Open MPI’s Fortran bindings.  Here’s some notable changes:

  • The mpif.h bindings continue to be supported by all Fortran compilers.
  • There’s a whole new “mpi” Fortran module that properly checks parameter types for all MPI subroutines (the prior implementation only checked some types of choice buffers for functions like MPI_SEND, and ignored others, like MPI_GATHER).  It’s lean, mean, and generally awesome.
  • There are two implementations of the “mpi_f08” Fortran module.  The default implementation does not support array subsections, but supports all other aspects of the MPI-3 Fortran bindings.  The 2nd implementation (selectable via a “./configure” command line switch) supports array subsections for 6-function MPI.
  • We’re debuting a new Fortran wrapper compiler: mpifort.  All 3 Fortran bindings (mpif.h, mpi, and mpi_f08) are available from this wrapper compiler.  mpif77 and mpif90 both still exist, but may be removed in a future Open MPI release.

There are a few limitations to the above features:

  • We’ve done all development and testing with the Intel compiler suite on Linux and OS X.  Other modern Fortran compilers may work — we just haven’t tested them yet (or tweaked the code to support them).
  • Gfortran, unfortunately, does not have enough features to support either the new mpi or mpi_f08 modules.
  • No Fortran compilers yet support the new Fortran ’08 assumed shape syntax.  That’s why the array-subsection implementation is both not the default and only supports 6-function MPI (INIT, FINALIZE, COMM_RANK, COMM_SIZE, SEND, and RECV) — and only with choice buffers as 2D INTEGER arrays.  The point was to show that array subsection support works — not to categorically implement it for every intrinsic type and array rank (which isn’t actually possible until Fortran compilers support the F08 assumed shape syntax).

As mentioned above, this implementation is a branch from Open MPI’s Subversion trunk.  We’ve actively been keeping up with the SVN trunk HEAD in order to be able to bring it into the mainline SVN someday (soon!).  I’m actually pretty sure that this is the longest branch that I think I’ve ever maintained:

  • First commit timestamp: Tue Apr 07 23:01:46 2009 -0400
  • Number of Mercurial commits (so far): 2,126
  • Number of merges from SVN trunk HEAD (so far): 100



In an effort to keep conversations fresh, Cisco Blogs closes comments after 60 days. Please visit the Cisco Blogs hub page for the latest content.