XMDF  2.2
4.15.3. Creating, opening and closing files

Three new functions will be necessary for creating, opening and closing files. These functions will be xfCreateFilePar, xfOpenFilePar and xfClosePar. xfCreateFilePar and xfOpenFilePar will have the same parameters as xfCreateFile and xfOpenFile, respectively, and two additional parameters, the MPI communicator and the MPI info object. The file must be opened differently, thus the additional parameters. xfClosePar will be used to terminate the parallel processing. xfClosePar must be called before the MPI communicator is closed. The functions with their parameters are now listed:

C
xfCreateFilePar(const char *a_Filename, xid *a_Id,
xmbool a_Overwrite, MPI_Info a_Info);
xfOpenFilePar(const char *a_Filename, xid *a_Id, xmbool a_ReadOnly,
MPI_Info a_Info);
xfClosePar();
FORTRAN
SUBROUTINE XF_CREATE_FILE_PAR (a_Filename, a_Id, a_Overwrite, a_Info, error)
CHARACTER(LEN=*), INTENT(IN) :: a_Filename
LOGICAL*2, INTENT(IN) :: a_Overwrite
INTEGER(HID_T), INTENT(OUT) :: a_Id
INTEGER, INTENT(IN) :: a_Info ! MPI info object to be used for
INTEGER, INTENT(OUT) :: error
SUBROUTINE XF_OPEN_FILE_PAR (a_Filename, a_ReadOnly, Id, a_Info, error)
CHARACTER(LEN=*), INTENT(IN) :: a_Filename
LOGICAL*2, INTENT(IN) :: a_ReadOnly
INTEGER(HID_T), INTENT(OUT) :: Id
INTEGER, INTENT(IN) :: a_Info ! MPI info object to be used for
INTEGER, INTENT(OUT) :: error
SUBROUTINE XF_CLOSE_FILE_PAR (error)
INTEGER, INTENT(OUT) :: error