[MPI3 Fortran] What to do with mpif.h in MPI-3?
jsquyres at cisco.com
Thu Jan 21 15:39:27 CST 2010
A tangled Fortran issue came up at the Atlanta MPI Forum meeting today, in the context of discussing the (contentious) proposal about a new C MPI_Count datatype. The gist of the proposal is that count parameters are currently int in the C bindings and INTEGER in all Fortran bindings. The proposal is to have a C type MPI_Count that would allow a C implementation to define the back-end type to be 64 bits in order to allow counts larger than 2^31.
*** NOTE: There are (many) issues with the proposed C MPI_Count type; let's not go into them here. I'm asking a Fortran question.
The proposed MPI-3 explicit bindings can easily accommodate a new MPI_Count type. So there's no problem there.
However, there are issues with having a large count type in the implicit interfaces in mpif.h. INTEGER*8 could be used for the count parameter type because all compilers support it, but it's not part of the language (right?). Members of the Forum today felt that using KIND parameters would be ugly because these are supposed to be Fortran-77 style bindings (although I believe you have all drummed into me before that all current Fortran compilers, even those that have an executable name with "77" in it, grok KIND typing just fine).
This discussion led to the question: should we even keep extending the mpif.h implicit interfaces?
It seems that there is a spectrum of 4 options:
1. Deprecate mpif.h and MPI's implicit Fortran interfaces. This is NOT removing mpif.h support from the spec or any implementation -- deprecating just states that the standard *MAY* remove them sometime in the future. If we went this route, I'm sure that it would be a LOOOOONG time before mpif.h is removed from the spec because of the millions of lines of existing MPI codes out there that use it.
2. Don't deprecate mpif.h, but do not include any new MPI-3 functionality in it. This is really only a minor distinction from deprecating; it's just a slightly less-strong statement meant to assure Fortran programmers that we are NOT abandoning mpif.h. However, the road to all new MPI-3 functionality is via the proposed MPI-3 explicit bindings (i.e., "use mpi3").
3. Include all new MPI-3 functionality in mpif.h *except* for the "large count" functionality. This allows mpif.h-using applications to get most of the MPI-3 goodness, with the exception that only INTEGER counts will be supported. If your app needs larger counts than that, you must "use mpi3".
4. Include all new MPI-3 functionality in mpif.h, including "large count" functionality.
What is everyone's opinion on which (1-4) the Forum should go with?
jsquyres at cisco.com
More information about the mpiwg-fortran