:ref:`MPI_File_close` |mdash| Closes a file (collective).
#include <mpi.h>
int MPI_File_close(MPI_File *fh)
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_FILE_CLOSE(FH, IERROR)
INTEGER FH, IERROR
USE mpi_f08
MPI_File_close(fh, ierror)
TYPE(MPI_File), INTENT(INOUT) :: fh
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
fh
: File handle (handle).
ierror
: Fortran only: Error status (integer).
:ref:`MPI_File_close` first synchronizes file state, then closes the file associated with fh. :ref:`MPI_File_close` is a collective routine. The user is responsible for ensuring that all outstanding requests associated with fh have completed before calling :ref:`MPI_File_close`.