[MPI3-IO] shared file pointer
Quincey Koziol
koziol at hdfgroup.org
Wed Feb 1 17:31:39 CST 2012
Hi Dries,
On Feb 1, 2012, at 3:37 PM, Dries Kimpe wrote:
>
>
> * Torsten Hoefler <htor at illinois.edu> [2012-02-01 15:18:41]:
>
>>> Because of the MPI_Iscan properties, a second MPI_File_iread_ordered could
>>> not proceed before the first one finished the scan phase, hence they would
>>> be properly ordered.
>> Well, they *can* complete out of order (not match though!) you need to
>> make sure the order it preserved.
>
> Good point.
>
> For this to work, we need an atomic Iscan + update fp.
> In other words, we also have to order FP update operations.
> But that is pretty easy to do, by using an attribute on the file handle.
>
> MPI_File_iread_ordered:
> lock
> -> get sequence number from file handle attribute, store number
> with operation
> -> add our number at the end of a list in attribute on file handle
> unlock
>
> start and wait (non-blocking) for iscan
>
> if iscan completes: wait until the number at the front of the list
> (in attribute is ours).
> if it is:
> update shared fp and remove from list
> else
> wait.
>
> do ifile_read_at.
>
>
> Obviously, there are better ways of doing this. The main point is that we
> need to introduce an extra dependency on the update for the shared fp so
> that we wait until any earlier operation already updated the shared fp.
>
> I guess the same technique (and attribute) could be used for the
> independent shared fp operations, but I'm really no fan of that.
>
> If only because when we do that, the independent shared fp update really
> becomes collective, as it will block until some other MPI rank completes
> the collective shared fp update.
>
> I would prefer to leave that as undefined ordering, because to me it
> really feels like doing two non-blocking receives using the same target
> buffer.
I'm neutral on it from a user (i.e. HDF5) perspective, since I don't think anyone will actually use the feature. But, if someone did, would an undefined ordering be an OK thing for them too? If so, we can say that the order is undefined in the standard and leave it at that...
Quincey
More information about the mpiwg-io
mailing list