ADIO_File ADIO_Open(MPI_Comm comm, char *filename, int file_system, int access_mode, ADIO_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, int iomode, ADIO_Hints *hints, int perm, int *error_code)
All opens are considered to be collective operations. The communicator comm specifies the participating processes. A process can open a file independently by using MPI_COMM_SELF as the communicator. The file_system parameter indicates the type of file system used. The access_mode parameter specifies the file access mode, which can be either ADIO_CREATE, ADIO_RDONLY, ADIO_WRONLY, ADIO_RDWR, ADIO_DELETE_ON_CLOSE, ADIO_EXCLUSIVE, or ADIO_ATOMIC. These modes may be combined by using the bitwise exclusive-or operator. The ADIO_EXCLUSIVE mode indicates that only the processes involved in this open call access the file; the ADIO implementation may use this information to perform client-side caching. The ADIO_ATOMIC mode indicates that the file system is required to guarantee atomicity of read/write operations. If this mode is not used, the file system need not provide atomicity and, therefore, may be able to improve performance.
The disp, etype, and filetype parameters are provided for supporting displacements, etypes, and filetypes as defined in MPI-IO . The iomode parameter is provided for supporting the I/O modes of Intel PFS . The ADIO_Hints structure may be used to pass hints to the ADIO implementation for potential performance improvement. Examples of hints include file-layout specification, prefetching/caching information, file-access style, data-partitioning pattern, and information required for use on heterogeneous systems. Hints are purely optional; the calling program need not provide any hints, in which case ADIO uses default values. Similarly, the ADIO implementation is not obligated to use the specified hints. The perm parameter specifies the access permissions for the file. The success or failure of the open operation is returned in error_code. The ADIO_Open routine returns a file descriptor that must be used to perform all subsequent operations on the file.
Note that the displacement, etype, filetype, iomode, access mode, and
hints associated with an open file can be changed by using the routine
void ADIO_Close(ADIO_File fd, int *error_code)
The close operation is also collective: All processes that opened the file must close it.