[MPIWG Fortran] Provide Fortran datatypes if Fortran bindings not provided?
Jeff Squyres (jsquyres)
jsquyres at cisco.com
Thu Feb 18 05:45:26 CST 2016
A question has come up recently in the Open MPI community (being debated in a lengthy thread here https://www.open-mpi.org/community/lists/users/2016/02/28448.php):
If Fortran support is not provided in an Open MPI installation (e.g., if Open MPI's configure script detects that there is no Fortran compiler, and therefore none of the mpif.h, mpi module, or mpi_f08 module are compiled), should Fortran datatypes (e.g., MPI_INTEGER) be available in the C bindings?
It was pointed out that MPI-3.1 says that the Fortran bindings are optional -- but datatypes are not currently marked as optional.
Hence, even if you don't have to Fortran compiler, you still have to have declarations for MPI_INTEGER (and friends) in mpi.h.
What do people think about this?
ARGUMENTS FOR KEEPING IT THE SAME
=================================
A1. MPI can set MPI_INTEGER to be equivalent to MPI_DATATYPE_NULL.
A2. MPI could probably figure out what Fortran INTEGER would have been (i.e., probably equivalent to C int) and just set MPI_INTEGER to be that.
A3. The whole point of having Fortran datatypes available in C is that even an MPI process written in C can receive/send data from MPI processes in Fortran. Hence, *this* MPI process -- compiled by an MPI implementation that does not have a Fortran compiler -- may not have Fortran support, but a peer MPI process in the same MPI job may have Fortran support.
ARGUMENTS FOR A CHANGE
======================
B1. Setting MPI_INTEGER (and friends) to MPI_DATATYPE_NULL -- which will cause a run-time MPI exception -- is somewhat anti-social behavior (and potentially confusing to the user).
B2. An MPI implementation can *assume* but can't *know* what the size/representation of Fortran datatypes are unless there's a Fortran compiler with which to test.
B3. A3 is a somewhat sketchy claim. It's obviously possible and valid, but fairly uncommon to have multiple MPI implementation installations involved in a single execution of an MPI application.
--
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
More information about the mpiwg-fortran
mailing list