next up previous
Next: Nonblocking Reads and Up: ADIO Design Previous: Contiguous Reads and

Noncontiguous Reads and Writes

void ADIO_ReadStrided(ADIO_File fd, void *buf, int count, MPI_Datatype datatype, int file_ptr_type, ADIO_Offset offset, ADIO_Status *status, int *error_code) Similarly ADIO_WriteStrided.

Parallel applications often need to read or write data that is located in a noncontiguous fashion in files and even in memory. ADIO provides routines for specifying noncontiguous accesses with a single call. Noncontiguous access patterns can be represented in many ways, e.g., [19]; we chose to use MPI derived datatypes because they are very general and have been standardized as part of MPI. ADIO_ReadStrided and ADIO_WriteStrided are independent and blocking versions of the noncontiguous read and write calls; nonblocking and collective versions are described in Sections 3.4 and 3.5, respectively. Note that these routines support all types of noncontiguous accesses that can be expressed in terms of MPI derived datatypes, not just simple uniform strides.

In the case of ADIO_ReadStrided, buf is the address of the buffer in memory into which count items of type datatype (an MPI derived datatype) must be read from the file. The starting location in the file may be specified by using explicit offset or individual file pointer. The noncontiguous storage pattern in the file is indicated by the filetype (an MPI derived datatype) specified in ADIO_Open or ADIO_Fcntl.

Note that ADIO_ReadContig and ADIO_WriteContig are special cases of ADIO_ReadStrided and ADIO_WriteStrided. However, we consider contiguous accesses separately, because they are directly supported by all file systems and, therefore, may be implemented efficiently.

Rajeev Thakur
Mon Oct 14 18:36:34 CDT 1996