next up previous contents
Next: Mandated Properties Up: Message Protocols Previous: Message-Probing Protocol

Message-Cancellation Protocol

For a send request, there is a time window during which a call to MPI_CANCEL can cause a cancel request packet to be sent to the message destination. This can happen in the following cases:

In all other cases, the MPI_CANCEL call must be resolved locally. Once a cancel request is sent, a cancel reply packet must be returned, independently of whether a synchronization ACK for that message was already sent back. This allows MPI_CANCEL to act as a simple RPC call, waiting for the reply, and simplifies the operations of the agents. If the message's first data packet has not been received by the destination process, the agent sends a IMPI_PK_CANCELYES reply packet and atomically destroys the buffered packet. Otherwise, a IMPI_PK_CANCELNO packet is sent back. Note that due to the message ordering guarantee, a cancel request cannot be received without the agent having fully read the message's first packet. Thus the message can be in either of two states: buffered, or received by the destination process. The transition from a buffered state to a received state happens when the message's first packet matches a receive request, irrespective of the state of the remaining packets in the case of a long message.

For a given pair of processes, the sender's request identifier is used by the receiver to select the message to be cancelled. The request identifier is unique among the sender's active requests. It is possible that multiple messages buffered at the receiver share the same sender request identifier. In such a case, only the last message received can be cancelled, the other messages are no longer attached to the active request. This requires that the storage of unexpected messages be searchable in reverse chronological order.


next up previous contents
Next: Mandated Properties Up: Message Protocols Previous: Message-Probing Protocol
IMPI Protocol ver 0.0
DRAFT March 22, 1999