[MPIWG Fortran] Question about MPI_Status_f2f08() and _f082f()

Jeff Squyres (jsquyres) jsquyres at cisco.com
Fri Jul 10 11:11:18 CDT 2020

On Jul 10, 2020, at 11:18 AM, Bill Long <longb at cray.com> wrote:
> In the “change” section there is this txt:
> 	• Within the mpi_08 Fortran module, the status was defined as TYPE(MPI_Status). Additionally, within both the mpi and the mpi_f08 modules, the constants MPI_STATUS_SIZE, MPI_SOURCE, MPI_TAG, MPI_ERROR, and TYPE(MPI_Status) are defined. New conversion routines were added: MPI_STATUS_F2F08, MPI_STATUS_F082F, MPI_Status_c2f08, and MPI_Status_f082c, In mpi.h, the new type MPI_F08_status, and the external variables MPI_F08_STATUS_IGNORE and MPI_F08_STATUSES_IGNORE were added.

Good point.

Just to be clear, you're referring to the changelog section in MPI-3.1, specifically bullet 30 on p802.

That being said:

- the changelog is non-binding ...but it does indicate our intent from that time
- the changelog text states that the mpi module has TYPE(MPI_Status) -- but it does not say it was added to mpif.h

> 1) Why would the F08 status be defined different from the C definition?  (If that were the case, conversions between f08 and C would be irrelevant). 

I remember that there was a lot of discussion about this at the time, which is what resulted in Figure 17.1.

I know there were discussions about making the F08 and C statuses the same, but for some reason we chose not to mandate it.  Perhaps we wanted to allow implementations to do whatever they wanted...?  (e.g., allow Status_c2f08 be a no-op if the implementation wanted to, but not mandate it)

> 2) \begin{unpopular} Why are the legacy mpi module and mpif.h still included in the spec?  These are embarrassingly obsolete.  If this was fixed, none of the above mentioned conversion routines would be needed.  \end(unpopular}

I would love it if we could ditch -- at a minimum -- mpif.h.

However, there's oodles of legacy code out there that uses it.  That's why even deprecating it gets shouted down at Forum meetings.

Jeff Squyres
jsquyres at cisco.com

More information about the mpiwg-fortran mailing list