[MPIWG Fortran] Proposal: MPI_SIZEOF not profiled
N.M. Maclaren
nmm1 at cam.ac.uk
Fri May 16 09:42:27 CDT 2014
On May 16 2014, Bill Long wrote:
>>
>> From my viewpoint, yes. MPI_Sizeof has never been an ordinary Fortran
>> function. I don't know the latest polymorphic features well enough
>> to know whether it even CAN be implemented within the standard. Indeed,
>> one reasonable way to implement it is by the mpif90 command running a
>> preprocessor on the source to replace it by the relevant value!
>
> The MPI subroutine MPI_SIZEOF is restricted to arguments of intrinsic
> numeric type (integer, real, complex). No derived types or polymorphic
> arguments. Fortran does have an intrinsic, STORAGE_SIZE, that returns the
> size value in bits. Divide by 8 to get the answer for MPI_SIZEOF. ...
Only since Fortran 2008 (2011) and MPI_Sizeof is a lot older than that.
I don't know how many compilers currently support STORAGE_SIZE, but I
will bet that it is not all, even now.
Regards,
Nick Maclaren.
More information about the mpiwg-fortran
mailing list