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

Bill Long longb at cray.com
Fri Jul 10 10:18:06 CDT 2020


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.

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). 

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}

Cheers,
Bill


> On Jul 9, 2020, at 7:54 PM, Jeff Squyres (jsquyres) via mpiwg-fortran <mpiwg-fortran at lists.mpi-forum.org> wrote:
> 
> MPI-3.1 Figure 17.1 (in section 17.2.5, starting on page 656) defines the following routines:
> 
> 1. MPI_Status_c2f() (from MPI-2)
> 2. MPI_Status_f2c() (from MPI-2)
> 3. MPI_Status_c2f08() (new in MPI-3)
> 4. MPI_Status_f082c() (new in MPI-3)
> 5. MPI_Status_f2f08() (new in MPI-3)
> 6. MPI_Status_f082f() (new in MPI-3)
> 
> All of the functions are fairly straightforward to implement in C.
> 
> But per the bottom part of Figure 17.1, two of the routines are supposed to be implemented in Fortran: #5 and #6.
> 
> Does this mean that TYPE(MPI_Status) needs to be defined in mpif.h and the mpi module?
> 
> I'm not sure how an MPI application would be able to invoke functions #5 and #6 without a definition of TYPE(MPI_Status) -- or even have a variable of that type that they need to convert to INTEGER(MPI_STATUS_SIZE).
> 
> -- 
> Jeff Squyres
> jsquyres at cisco.com
> 
> _______________________________________________
> mpiwg-fortran mailing list
> mpiwg-fortran at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran

Bill Long                                                                       longb at cray.com
Principal Engineer, Fortran Technical Support &   voice:  651-605-9024
Bioinformatics Software Development                      fax:  651-605-9143
Cray, a Hewlett Packard Enterprise company/ 2131 Lindau Lane/  Suite 1000/  Bloomington, MN  55425





More information about the mpiwg-fortran mailing list