Re: GR cancel_fn return value

Steve Huss-Lederman (lederman@cs.wisc.edu)
Wed, 16 Apr 1997 20:56:45 -0500 (CDT)

The issue raised is why not have the cancel_fn for GR return whether
the request was cancelled. The answer is this was discussed in some
detail at subcommittee meetings but the details are not in the
document. What it boils down to is that after a cancel returns, even
in the pt-2-pt case, you do not know if the request was terminated or
not. All MPI requires is that the completion of this request now
becomes a local operation. This guarantees that a wait on this
request will return in finite time independent of what happens on
other processes. This is one reason why you have to check the status
in MPI-1 to see whether it was cancelled. We did not want to rule out
the same possibility in GR so the cancel_fn does not say whether the
request was cancelled or not. It is supposed to enforce the local
semantics.

Another part of the question is how MPI knows if the cancel
succeeded. The answer is it does not until the query_fn is called and
it fills in the status. The GR must still call MARK_COMPLETE for the
wait to finish. To do a cancel where it does not complete the request
in the cancel_fn probably requires storing state somewhere (like in
extra_state) so the progress engine for the GR knows if it is
completing the cancel or finishing the operation. In the philosophy
of the current GR, MPI really does not need to know if it was
cancelled or not. It just needs to know when it is complete. How is
completes is up the the implementor of the GR and outside MPI.

I hope this helps (and accurately reflects what I recall
happened at the meeting).

Steve