mpi-forum / mpi-forum-historic

Migration of old MPI Forum Trac Tickets to GitHub. New issues belong on mpi-forum/mpi-issues.
http://www.mpi-forum.org
2 stars 3 forks source link

Remove MPI_Cancel for send requests #480

Open mpiforumbot opened 8 years ago

mpiforumbot commented 8 years ago

Originally by balaji on 2015-06-05 11:27:43 -0500


In MPI-3.1, it is valid to call MPI_Cancel on send requests. This is hard to implement efficiently. For example, some MPI implementations are required to send additional information (such as a sequence number) with each operation to allow for operations to be potentially cancelled. The original reason to add cancel capability for send operations was for symmetry with receive operations. But that reason is no longer true since cancel operations are not support for nonblocking collective communication, RMA or file I/O operations.


-Proposal:* Make the usage of cancel for send requests erroneous.


-Changes to the text:*

MPI-3.1 standard, page 64, lines 34--35:

-Posting a send or a receive ties up user resources (send or receive buffers), and a cancel may be needed to free these resources gracefully.*

should change to:

-Posting a receive operation ties up user resources (receive buffers), and a cancel may be needed to free these resources gracefully.*

MPI-3.1 standard, page 72, lines 9--10:

-A call to MPI_CANCEL marks for cancellation a pending, nonblocking communication operation (send or receive).*

should change to

-_A call to MPICANCEL marks for cancellation a pending, nonblocking receive operation. Cancelation of other nonblocking operations is not valid.*

MPI-3.1 standard, page 72, lines 25--29 should be deleted:

-If a send is marked for cancellation, then it must be the case that either the send completes normally, in which case the message sent was received at the destination process, or that the send is successfully cancelled, in which case no part of the message was received at the destination. Then, any matching receive has to be satisfied by another send.*

The following text should be added in its place:

-Rationale. While cancelation of send operations can be defined, the Forum decided that the complexity to the implementation and the lack of compelling use cases did not support canceling anything other than receive operations.*

MPI-3.1 standard, page 53, lines 27--30:

-The status object for a send operation may be queried by a call to MPI_TEST_CANCELLED (see Section 3.8).*

should be deleted.

MPI-3.1 standard, page 53, lines 35--39:

-Note that, at this point, we can no longer cancel the send (see Section 3.8). If a matching receive is never posted, then the buffer cannot be freed. This runs somewhat counter to the stated goal of MPI_CANCEL (always being able to free program space that was committed to the communication subsystem).*

should be deleted.


-Impact on Implementations:* Joy and celebration.


-Impact on Users:* Huh? Send cancellation was allowed earlier?


-References:*

mpiforumbot commented 8 years ago

Originally by gropp on 2015-06-08 11:42:11 -0500


A variation on this could add a rationale that explains that while cancel of send (or of other nonblocking operations) can be defined, the Forum decided that the complexity to the implementation and the lack of a compelling use case did not support cancelling anything other than receives, where a clear use case (e.g., double buffering) exists.

mpiforumbot commented 8 years ago

Originally by balaji on 2015-06-08 18:44:39 -0500


I've modified the ticket to add a variant of the proposed rationale. I've also added a note in the proposed normative text to explicitly call out that cancelation of other nonblocking operations is not valid.