PnetCDF Design


MPI_File_set_view() is a collective call, and we don't like having to call it as often as we do. However, that's the way MPI is written, so we end up needing nearly every MPI_File_read_all() and MPI_File_write_all() call to partner with an MPI_File_set_view.

Prior version 1.6.0, we also reset the file view right after each MPI read/write call, because root process may need to write to file header, e.g. to update the number of records, and this write is an independent I/O (for this we cannot reset fileview because MPI_File_set_view() is collective). Starting from 1.6.0, the call to MPI_File_set_view() right after each MPI read/write call is drop, since root process's fileview has been changed to always include file header.

We do try to limit the number of MPI_File_set_view calls: we can avoid setting the fileview entirely when the request is a single contiguous file region. In this case, MPI-IO calls with explicit offset functions are used.

Some clarifications:

When switching between collective and independent data modes, PnetCDF will select the right handle to call MPI-IO functions.


Return to PnetCDF Home