Shouldn't the MPI example be using MPI_Ssend? MPI_Send does a send in standard mode, meaning that
In this [standard] mode, it is up to MPI to decide whether outgoing messages will be buffered. MPI may buffer outgoing messages. In such a case, the send call may complete before a matching receive is invoked.
MPI_Ssend operates in synchronous mode, meaning that
However, the [synchronous] send will complete successfully only if a matching receive is posted, and the receive operation has started to receive the message sent by the synchronous send.
This comment was marked helpful 0 times.
max
In example 1 there is deadlock as neither queue has a place to store its response. Queue A has produced work for B's queue, but B will not have work in its queue until it gives more work to A. Neither queue can make progress as a result and will continue to wait.
This comment was marked helpful 0 times.
bosher
Example 2 is a classic Dining philosophers problem: all the processors are waiting for one of the other processor's resource while holding a resource that is being waited by another processor. More explanation can be found here: Dining philosophers problem
Shouldn't the MPI example be using
MPI_Ssend
?MPI_Send
does a send in standard mode, meaning thatMPI_Ssend
operates in synchronous mode, meaning thatThis comment was marked helpful 0 times.
In example 1 there is deadlock as neither queue has a place to store its response. Queue A has produced work for B's queue, but B will not have work in its queue until it gives more work to A. Neither queue can make progress as a result and will continue to wait.
This comment was marked helpful 0 times.
Example 2 is a classic Dining philosophers problem: all the processors are waiting for one of the other processor's resource while holding a resource that is being waited by another processor. More explanation can be found here: Dining philosophers problem
This comment was marked helpful 0 times.