[MPIWG Fortran] Another MPI_SIZEOF question

William Gropp wgropp at illinois.edu
Fri Jun 6 20:27:04 CDT 2014


There's no (small) errata.  The Forum decided that MPI would no longer support Fortran 77 (and this was pretty clear from the discussions).  In MPI-2, MPI_SIZEOF was part of the extended support; the basic support did not include it and thus mpif.h could be implemented with Fortran 77 (see page 291, 10.2.4 in MPI-2.0).  This is no longer true; see 17.1.4 (mpif.h) which says the second set of function prototypes must be supported for all MPI functions, and page 621, where MPI_SIZEOF has a second set of function prototypes.  There are other references to overloading in mpif.h; see, for example, page 339, which would require an MPI implementation to provide different mpif.h files depending on which level of Fortran support is provided by the compiler (which might depend on a compiler switch!). 

Bill

William Gropp
Director, Parallel Computing Institute
Thomas M. Siebel Chair in Computer Science
University of Illinois Urbana-Champaign





On Jun 6, 2014, at 6:27 PM, Jeff Squyres (jsquyres) wrote:

> Do we need to add some errata text about mpif.h and MPI-sizeof, particularly wrt older fortran compilers?
> 
> Sent from my phone. No type good. 
> 
>> On Jun 6, 2014, at 9:32 AM, "William Gropp" <wgropp at illinois.edu> wrote:
>> 
>> Yes, despite the new claims in MPI-3, the mpif.h file for MPICH has been required to be backward compatible with Fortran 77, since there are still Fortran 77 codes.  MPI-3 essentially mandated that Fortran 77 compilers be unable to compile standard conforming MPI codes, and the MPI implementations that choose to permit existing codes to be compiled decided to violate the standard in this place.
>> 
>> Note that storage_size appeared in Fortran 2008, not earlier versions of Fortran 9x, which is why we added MPI_SIZEOF.
>> 
>> Having said that, yes, I think that deprecating but not yet removing MPI_SIZEOF makes sense.
>> 
>> Bill
>> 
>> William Gropp
>> Director, Parallel Computing Institute
>> Thomas M. Siebel Chair in Computer Science
>> University of Illinois Urbana-Champaign
>> 
>> 
>> 
>> 
>> 
>>> On Jun 6, 2014, at 9:11 AM, Jeff Squyres (jsquyres) wrote:
>>> 
>>> It strikes me that the current MPI_SIZEOF text does not limit this function to the mpi or mpi_f08 modules, meaning that it needs to be supported/available in mpif.h as well.
>>> 
>>> Since SIZEOF can only be implemented via overloaded procedures, this means that implementations have to put an INTERFACE block with the overloaded procedures for MPI_SIZEOF in mpif.h.  Yowza!  This goes against a long-standing tradition of not including procedure prototypes in mpif.h.
>>> 
>>> If I'm interpreting this properly, it looks like neither Open MPI nor MPICH do this correctly.
>>> 
>>> Am I correct in this deduction?
>>> 
>>> Random side note: this makes me wonder how much MPI_SIZEOF is really used...
>>> 
>>> -- 
>>> Jeff Squyres
>>> jsquyres at cisco.com
>>> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
>>> 
>>> _______________________________________________
>>> mpiwg-fortran mailing list
>>> mpiwg-fortran at lists.mpi-forum.org
>>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-fortran
>> 
>> _______________________________________________
>> mpiwg-fortran mailing list
>> mpiwg-fortran at lists.mpi-forum.org
>> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-fortran
> _______________________________________________
> mpiwg-fortran mailing list
> mpiwg-fortran at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpiwg-fortran

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-fortran/attachments/20140606/e6a334e6/attachment-0001.html>


More information about the mpiwg-fortran mailing list