[MPIWG Fortran] MPI_SIZEOF: redux

N.M. Maclaren nmm1 at cam.ac.uk
Thu Jun 12 06:25:17 CDT 2014


On Jun 6 2014, Malcolm Cohen wrote:
>
>>Lots of user codes are using mpif.h
>
> So what has that got to do with deprecating MPI_SIZEOF? Nothing 
> whatsoever.

Agreed.

> Not to mention that not a single one of those people using the so-called 
> F77 binding are using a mere FORTRAN 77 compiler. Even the INCLUDE 
> "mpi.h" line is a Fortran 90 feature that is not present in FORTRAN 77.

Sorry but, in practice, it isn't.  It's a 'Fortran IV' extension to Fortran
66 (sometimes with syntactic differences) and 77, that has been nearly
ubiquitous since the early 1970s.  I agree that it didn't reach the
standard until Fortran 90.

It's explicitly one of the required extensions to Fortran 77 (see MPI 1.3,
2.5.1, lines 34-36).

> But since STORAGE_SIZE is far from universally available, this falls at 
> the very first hurdle. (And alternative ways of computing sizeof in e.g. 
> pure Fortran 90 are, although easy to write, not particularly convenient 
> to use, so those fall at the second hurdle.)

Are they?  I can't think of any that are entirely portable, though I can
think of several that will probably work on all current systems.  I agree
that such tricks are not something that anyone should be teaching or
encouraging.


Regards,
Nick Maclaren.





More information about the mpiwg-fortran mailing list