NAME
MMPPIIFFiilleeggeettttyyppeeeexxtteenntt - Returns the extent of the data type in a
file. SSYYNNTTAAXX C Syntax#include
int MPIFilegettypeextent(MPIFile fh, MPIDatatype datatype, MPIAint *extent)Fortran Syntax (see FORTRAN 77 NOTES)
INCLUDE 'mpif.h'MPIFILEGETTYPEEXTENT(FH, DATATYPE, EXTENT, IERROR)
INTEGER FH, DATATYPE, IERROR
INTEGER(KIND=MPIADDRESSKIND) EXTENT CC++++ SSyynnttaaxx#include
MPI::Aint MPI::File::Gettypeextent(const MPI::Datatype& datatype) const IINNPPUUTT PPAARRAAMMEETTEERRSS fh File handle (handle). datatype Data type (handle). OOUUTTPPUUTT PPAARRAAMMEETTEERRSS extent Data type extent (integer).IERROR Fortran only: Error status (integer).
DESCRIPTION
MPIFilegettypeextent can be used to calculate extent for datatype in the file. The extent is the same for all processes accessing thefile associated with fh. If the current view uses a user-defined data
representation, MPIFilegettypeextent uses the dtypefileextentfn callback to calculate the extent. FFOORRTTRRAANN 7777 NNOOTTEESS The MPI standard prescribes portable Fortran syntax for the EXTENTargument only for Fortran 90. FORTRAN 77 users may use the non-portable
syntax INTEGER*MPIADDRESSKIND EXTENT where MPIADDRESSKIND is a constant defined in mpif.h and gives the length of the declared integer in bytes. NNOOTTEESS If the file data representation is other than "native," care must betaken in constructing etypes and file types. Any of the data-type con-
structor functions may be used; however, for those functions that accept displacements in bytes, the displacements must be specified in terms of their values in the file for the file data representationbeing used. MPI will interpret these byte displacements as is; no scal-
ing will be done. The function MPIFilegettypeextent can be used to calculate the extents of data types in the file. For etypes and file types that are portable data types, MPI will scale any displacements in the data types to match the file data representation. Data types passed as arguments to read/write routines specify the data layout in memory;therefore, they must always be constructed using displacements corre-
sponding to displacements in memory. EERRRROORRSS Almost all MPI routines return an error value; C routines as the valueof the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set toMPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. For MPI I/O function errors, the default error handler is setto MPIERRORSRETURN. The error handler may be changed with
MPIFileseterrhandler; the predefined error handlerMPIERRORSAREFATAL may be used to make I/O errors fatal. Note that
MPI does not guarantee that an MPI program can continue past an error. Open MPI 1.2 September 200M6PIFilegettypeextent(3OpenMPI)