[MPI3 Fortran] MPI_SIZEOF question

Jeff Squyres jsquyres at cisco.com
Mon May 23 08:30:00 CDT 2011


I'm re-working Open MPI's Fortran implementation with Craig.

The MPI_SIZEOF function is supposed to return the size of any Fortran intrinsic data type.  MPI-2.2 16.2.5 p494:31-44 says:

-----
The following functions allow a user to obtain a size-specific MPI datatype for any intrinsic Fortran type.

MPI_SIZEOF(x, size)
IN x	a Fortran variable of numeric intrinsic type (choice)
OUT size	size of machine representation of that type (integer)

MPI_SIZEOF(X, SIZE, IERROR) 
<type> X
INTEGER SIZE, IERROR 

This function returns the size in bytes of the machine representation of the given variable. It is a generic Fortran routine and has a Fortran binding only.
-----

Is there any way of implementing that other than an interface with an overloaded subroutine for every single intrinsic type (including dimension)?

-- 
Jeff Squyres
jsquyres at cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/





More information about the mpiwg-fortran mailing list