MPI_File_close(3)                                            MPI_File_close(3)


NAME
     MPI_File_close - Closes a file

SYNOPSIS
     C:

          #include "mpi.h"

          int MPI_File_close(MPI_File *fh)


     Fortran:

          INCLUDE "mpif.h" (or USE MPI)

          INTEGER fh, ierror

          CALL MPI_FILE_CLOSE(fh, ierror)


DESCRIPTION
     The MPI_File_close routine deallocates the file handle object and sets fh
     to MPI_FILE_NULL. MPI_File_close first synchronizes file state
     (equivalent to performing an MPI_File_sync routine), then closes the file
     associated with fh.  The file is deleted if it was opened with access
     mode MPI_MODE_DELETE_ON_CLOSE (equivalent to performing an
     MPI_File_delete routine).  MPI_File_close is a collective routine.

     If the file is deleted when it is closed and there are other processes
     currently accessing the file, the status of the file and the behavior of
     future accesses by these processes are implementation dependent.

     The user is responsible for ensuring that all outstanding nonblocking
     requests and split collective operations associated with fh made by a
     process have completed before that process calls MPI_File_close.

     This routine accepts the following argument:

     fh   Specifies the file handle (handle)

     ierror
          Specifies the return code value for successful completion, which is
          in MPI_SUCCESS.  MPI_SUCCESS is defined in the mpif.h file.

   Notes for Fortran
     All MPI objects (for example, MPI_Datatype, MPI_Comm, MPI_File) are of
     type INTEGER.

SEE ALSO
     MPI_File_delete(3), MPI_File_open(3), MPI_File_sync(3), MPI_IO(3)


                                                                        Page 1