[MPIWG Fortran] Agenda for meeting today (in ~10 mins)
Malcolm Cohen
malcolm at nag-j.co.jp
Sat Dec 6 19:02:45 CST 2014
Hi folks,
>3. Deprecate MPI_SIZEOF
...
>Bill: implementation of storage_size() is pretty trivial
>JeffH: there's also c_sizeof() (Bill says this is F03)
Actually C_SIZEOF like STORAGE_SIZE was added in F2008; it does not appear
in F2003.
>Bill: c_sizeof() uses C rules -- e.g., you get size of total array,
>etc. (returns answer in bytes, not bits).
Yes, but it only works for "interoperable" objects... so not on Fortran
derived types that do not have the BIND attribute. Some compilers might do
C_SIZEOF on anything, but it is certainly not in the standard. So
STORAGE_SIZE(thingo)/STORAGE_SIZE(byte) would seem to be the recommended
formulation, multiplied by SIZE(thingo) if it is an array and you want the
total size of the array.
Cheers,
--
...........................Malcolm Cohen, NAG Oxford/Tokyo.
More information about the mpiwg-fortran
mailing list