15.2.6. Querying the Size of a File

PreviousUpNext
Up: File Manipulation Next: Querying File Parameters Previous: Preallocating Space for a File

MPI_FILE_GET_SIZE(fh, size)
IN fhfile handle (handle)
OUT sizesize of the file in bytes (integer)
C binding
int MPI_File_get_size(MPI_File fh, MPI_Offset *size)
Fortran 2008 binding
MPI_File_get_size(fh, size, ierror)

TYPE(MPI_File), INTENT(IN) :: fh
INTEGER(KIND=MPI_OFFSET_KIND), INTENT(OUT) :: size
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
Fortran binding
MPI_FILE_GET_SIZE(FH, SIZE, IERROR)

INTEGER FH, IERROR
INTEGER(KIND=MPI_OFFSET_KIND) SIZE

MPI_FILE_GET_SIZE returns, in size, the current size in bytes of the file associated with the file handle fh. As far as consistency semantics are concerned, MPI_FILE_GET_SIZE is a data access operation (see Section File Consistency).


PreviousUpNext
Up: File Manipulation Next: Querying File Parameters Previous: Preallocating Space for a File


Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023