MPI_TYPE_EXTENT, MPI_Type_extent Purpose Returns the extent of any defined datatype. C synopsis #include int MPI_Type_extent(MPI_Datatype datatype,MPI_Aint *size); FORTRAN synopsis include 'mpif.h' or use mpi MPI_TYPE_EXTENT(INTEGER DATATYPE,INTEGER EXTENT,INTEGER IERROR) Parameters datatype is the datatype (handle) (IN) size is the datatype extent (integer) (OUT) IERROR is the FORTRAN return code. It is always the last argument. Description This subroutine returns the extent of a datatype. The default extent of a datatype is the span from the first byte to the last byte occupied by entries in this datatype and rounded up to satisfy alignment requirements. Notes MPI_TYPE_GET_EXTENT supersedes MPI_TYPE_EXTENT. Rounding for alignment is not done when MPI_UB is used to define the datatype. Types defined with MPI_LB, MP_UB, or with any type that itself contains MPI_LB or MPI_UB may return an extent that is not directly related to the layout of data in memory. Refer to MPI_TYPE_STRUCT or MPI_TYPE_CREATE_STRUCT for more information on MPI_LB and MPI_UB. MPI_TYPE_CREATE_RESIZED can also alter default extent. You can still use this subroutine in FORTRAN 64-bit applications if you know that all datatype extents can be represented by an INTEGER, but you do so at your own risk. MPI_TYPE_GET_EXTENT should be used in new codes. Errors Invalid datatype MPI not initialized MPI already finalized Related information