[MPIWG Fortran] Another MPI_SIZEOF question

William Gropp wgropp at illinois.edu
Tue Jun 10 09:10:15 CDT 2014


Rolf,

The problem is that the standard also requires MPI_SIZEOF to be supported by every version of the Fortran interfaces, even mpif.h.  This was *not* the case in MPI-2.  The standard even acknowledges that MPI_SIZEOF requires overloading, and that overloading definition is required in mpif.h . Thus, mpif.h cannot be implemented in a way that supports a Fortran 77 compiler.  

Jeff, as I noted before, in MPI-2, MPI_SIZEOF was not required for the Fortran "basic" support, thus MPI-2 did not break the existing practice with Fortran 77 compilers and the mpif.h include file (see the beginning of section 10.2.5 in MPI-2).

And yes, as has been noted for a long time, the MPI-2 definition of Fortran interfaces for the "Extended" Fortran support were impractical within standard Fortran.  So MPI has been working around limitations in the Fortran since the very beginning.  I think all of us are happy to see Fortran evolving to the point where it is possible to implement a library that can move data (this could be a single-core I/O library; it need not be MPI).  That's not the issue.  The issue is deciding that mpif.h is not a way to compile MPI programs with a Fortran compiler that is for Fortran before 2008 + TS29113 but simply a different interface to the one true and only Fortran interface - which isn't even yet standard (since it requires TS29113).

Bill

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





On Jun 10, 2014, at 3:48 PM, Rolf Rabenseifner wrote:

>> As far as I can tell from the
>> requirement that MPI_SIZEOF be supported, mpif.h also requires
>> Fortran 2008 + TS29113, meaning that many legacy MPI programs cannot
>> be compiled with a standard conforming MPI implementation and a
>> Fortran compiler that implements only, say, Fortran 2008 (but not
>> the TS29113, which is *not* part of the standard) or Fortran 2003.
> 
> Section 17.1.6 on page 609 "MPI for Different Fortran Standard Versions"
> tries to define the rules for standard compliant MPI-3.0 with 
> a Fortran 77, 90, 95, 2003, and 2003/2008+TS29113 compiler,
> i.e., MPI-3.0 can be implemented with the restrictions, 
> e.g., MPI_SUBARRAYS_SUPPORTED needs to be set to .FALSE..
> 
> Rolf 
> 
> 
> 
> ----- Original Message -----
>> From: "William Gropp" <wgropp at illinois.edu>
>> To: "MPI-WG Fortran working group" <mpiwg-fortran at lists.mpi-forum.org>
>> Sent: Tuesday, June 10, 2014 3:06:08 PM
>> Subject: Re: [MPIWG Fortran] Another MPI_SIZEOF question
>> 
>> 
>> This naming corresponds to MPI-3 but not to the use in MPI-1 nor to
>> what some users may still want, which is what Jeff is talking about.
>>  
>> 
>> 
>> And note: When the original MPI Fortran interface was defined, it was
>> known not to be standard conformant - in fact, I raised that issue
>> and raised a straw man alternative that was not accepted by the MPI
>> Forum.  The fact at the time was that it was widely recognized that
>> Fortran's (meaning Fortran 77) strict rules with the absence of any
>> escape combined with no real general data mechanism, needed by many
>> different libraries, not just MPI, made the type checking rules
>> impractical, and virtually no compiler of the time implemented this
>> check (the only one I knew of was WATFOR, and you could turn it
>> off). 
>> 
>> 
>> Despite this, many applications were written using Fortran.  Those
>> applications in practice, despite not conforming to the letter of
>> the standard, were portable and contributed to the success of MPI.
>>  I don't find comments about "MPI never supported Fortran" to be
>> useful, even if they are technically true.
>> 
>> 
>> In my opinion, the use of "mpif.h" should have been to support
>> existing programs in their existing compilation environments.  That
>> might be fixed-format early Fortran, either Fortran 77 or perhaps
>> Fortran 90 or Fortran 95. The goal of MPI-3 should have been to
>> ensure that new programs used the mpi or mpi_f08 modules and that
>> existing programs could continue to be used.  That is *not* the
>> situation that we have now.   As far as I can tell from the
>> requirement that MPI_SIZEOF be supported, mpif.h also requires
>> Fortran 2008 + TS29113, meaning that many legacy MPI programs cannot
>> be compiled with a standard conforming MPI implementation and a
>> Fortran compiler that implements only, say, Fortran 2008 (but not
>> the TS29113, which is *not* part of the standard) or Fortran 2003.  
>> 
>> 
>> Bill
>> 
>> 
>> 
>> 
>> 
>> 
>> William Gropp
>> Director, Parallel Computing Institute Thomas M. Siebel Chair in
>> Computer Science
>> 
>> 
>> University of Illinois Urbana-Champaign
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> On Jun 10, 2014, at 2:44 PM, Jeff Squyres (jsquyres) wrote:
>> 
>> 
>> 
>> On Jun 10, 2014, at 8:35 AM, Jeff Hammond < jeff.science at gmail.com >
>> wrote:
>> 
>> 
>> 
>> What shorthand will you permit for what is meant when Bill and I
>> refer
>> 
>> 
>> to Fortran 77 support in MPI that distinguishes it from F90 and F08
>> 
>> 
>> module support?
>> 
>> I usually say "the mpif.h interface", "the (Fortran) mpi module", and
>> "the mpi_f08 module".  Indeed, I have renamed the "ompi/mpi/f77" and
>> "ompi/mpi/f90" directories from previous versions of OMPI to
>> "ompi/mpi/fortran/mpifh" and "ompi/mpi/fortran/use-mpi".  
>> 
>> Meaning: I have seen the error of my ways and corrected myself.  You
>> can, too.  :-)
>> 
>> --
>> 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
> 
> -- 
> Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner at hlrs.de
> High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530
> University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832
> Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner
> Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307)
> _______________________________________________
> 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/20140610/86f7773b/attachment-0001.html>


More information about the mpiwg-fortran mailing list