next up previous index
Next: Logical versus Physical File Up: MPI IO Previous: Writing and Reading MPI

File Consistency

Files that are manipulated simultaneously by multiple processes without locking can easily become corrupted. It is therefore vital that MPI I/O semantics are defined so that this corruption can be avoided. It is possible to construct overlapping file views and this at times may not be accidental. If this is the case then the programmer may need to order writes on a file by setting barriers or synchronizing operations with messages. It is also possible to set the so called atomic mode on a file, and this will result in all I/O operations on that file becoming sequentially consistent although the sequence itself will remain undetermined. The atomic mode is set with a call to

int MPI_File_set_atomicity(MPI_File fh, int flag) 

MPI_FILE_SET_ATOMICITY(FH, FLAG, IERROR)
INTEGER FH, IERROR
LOGICAL FLAG
Additionally MPI files can be synced or flushed with a call to:
int MPI_File_sync(MPI_File fh) 

MPI_FILE_SYNC(FH, IERROR)
INTEGER FH, IERROR

The HPSS version of MPI allows to read files directly from tapes. Such files are referred to as sequential stream files. They must be opened with the MPI_MODE_SEQUENTIAL flag set in the amode. For these files, the only permitted data access operations are shared file pointer reads and writes. Filetypes and etypes with holes are erroneous.


next up previous index
Next: Logical versus Physical File Up: MPI IO Previous: Writing and Reading MPI
Zdzislaw Meglicki
2001-02-26