TextFileWriteOpen
Open a file for writing text output from a parallel program
Synopsis
int TextFileWriteOpen(MPI_Comm comm, int root, const char *fname, MPI_Info info,
TextFile *fh_p)
Input Parameters
- comm
- MPI Communicator of all processes that will perform text writes
- root
- Rank of process (in comm) that will perform I/O to the file
- fname
- Name of the file to open.
- info
- MPI Info object that may be used for opening the file. Use
MPI_INFO_NULL for no special behavior.
Output Parameter
- fh_p
- Pointer to a TextFile
Notes
The TextFileWriteXxx routines provide a way to ensure that multiple
parallel processes correctly write output in a rank-ordered way. Using
output from individual processes, even if they are synchronized (e.g.,
with MPI_Barrier or the seqBegin and seqEnd routines), does not
guarantee ordered output because the aggregation of data sent by I/O routines
on each process to a file server does not guarantee any ordering.
Return value
An error code. Currently, MPI_SUCCESS is returned on success and an
MPI error class is returned on failure. A future implementation may
return a user-defined MPI error code.