Features:
- POSIX I/O calls to operate on file
- MPI calls to coordinate file access
- Can not perform collective I/O
Source Code Files:
src/H5FDmpiposix.c and src/H5FDmpiposix.h
API calls:
- H5Pset_fapl_mpio
- Dups the MPI Comm object (passed as parameter) and stores it in the FAPL for future use
- H5Pget_fapl_mpio
- Dups the MPI Comm object (from FAPL) and passes it back to application
VFD callbacks implemented:
- open (H5FD_mpiposix_open)
- Dups the MPI Comm object (from the FAPL) for use in coordination operations
- Gets rank & size from file's Comm
- if ( rank == 0)
- Possibly set different file access flags (from other processes)
- POSIX open() file (possibly creating it)
- MPI_Bcast() results of file open from rank 0 to other ranks
- <check for failed open on all ranks>
- If (rank != 0)
- POSIX open file (without creating it)
- if (rank == 0)
- Use stat() to get file's size
- MPI_Bcast() file size from rank 0 to other ranks
- <set special GPFS fcntl() values, if enabled>
- close (H5FD_mpiposix_close)
- POSIX close()
- MPI_Barrier()
- Free file's Comm object
- cmp (H5FD_mpiposix_cmp)
- Use inode value (set in open callback) to check if files are same
- query (H5FD_mpiposix_query)
- Sets flags to indicate it's OK to aggregate allocation of file metadata and small raw data
- No other flags set
- get_eoa (H5FD_mpiposix_get_eoa)
- retrieve (local) EOA value
- set_eoa (H5FD_mpiposix_set_eoa)
- set (local) EOA value
- get_eof (H5FD_mpiposix_get_eof)
- get (local) EOF value
- get_handle (H5FD_mpiposix_get_handle)
- Directly copies POSIX file handle value back into application buffer
- read (H5FD_mpiposix_read)
- <seek to correct location, if not there already>
- use POSIX read() call to read from file
- if ( (<I/O size> - <bytes read>) > 0)
- memset() the application buffer with the number of bytes that weren't read
- <update seek position>
- write (H5FD_mpiposix_write)
- <same as for read callback, with POSIX write call instead>
- truncate (H5FD_mpiposix_truncate)
- if ( <EOA> is > than <last EOA> )
- POSIX truncate() call
- MPI_Barrier()
- set <last EOA> to <EOA>