Hi,

Seems like it's impossible to cancel buffered sends with pml/cm.

>From one hand, pml/cm completes the buffered send immediately 
>(MCA_PML_CM_HVY_SEND_REQUEST_START):
        if(OMPI_SUCCESS == ret &&                                               
 \
           sendreq->req_send.req_send_mode == MCA_PML_BASE_SEND_BUFFERED) {     
 \
            sendreq->req_send.req_base.req_ompi.req_status.MPI_ERROR = 0;       
 \
            ompi_request_complete(&(sendreq)->req_send.req_base.req_ompi, 
true); \
        }

So, if the user is doing Bsend()/Cancel()/Wait()/Test_canceled(), the Wait() 
would be a no-op.
Therefore when mtl_cancel() was called, it had to either cancel/guarantee 
completion *immediately*, otherwise the return from Test_canceled would be 
undefined.
However, it's not always possible to cancel immediately, because need to make 
sure the peer has not matched it yet (fox example, with mtl mxm).

IMHO it's wrong for pml_cm to complete a buffered send immediately.
What do you think?

--Yossi

Reply via email to