diff --git a/ompi/mca/pml/ob1/pml_ob1_progress.c b/ompi/mca/pml/ob1/pml_ob1_progress.c index 11b08a5327..bbd505d2fe 100644 --- a/ompi/mca/pml/ob1/pml_ob1_progress.c +++ b/ompi/mca/pml/ob1/pml_ob1_progress.c @@ -53,6 +53,7 @@ int mca_pml_ob1_progress(void) completed_requests++; break; case MCA_PML_OB1_SEND_PENDING_START: + MCA_PML_OB1_SEND_REQUEST_RESET(sendreq); endpoint = sendreq->req_endpoint; send_succedded = false; for(j = 0; j < (int)mca_bml_base_btl_array_get_size(&endpoint->btl_eager); j++) { diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.c b/ompi/mca/pml/ob1/pml_ob1_sendreq.c index 2a8ac038e7..3be8d60375 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.c @@ -70,7 +70,8 @@ void mca_pml_ob1_send_request_process_pending(mca_bml_base_btl_t *bml_btl) add_request_to_send_pending(sendreq, MCA_PML_OB1_SEND_PENDING_START, true); } else { - rc = mca_pml_ob1_send_request_start_btl(sendreq, send_dst); + MCA_PML_OB1_SEND_REQUEST_RESET(sendreq); + rc = mca_pml_ob1_send_request_start_btl(sendreq, send_dst); if (OMPI_ERR_OUT_OF_RESOURCE == rc) { /* No more resources on this btl so prepend to the pending * list to minimize reordering and give up for now. */ diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.h b/ompi/mca/pml/ob1/pml_ob1_sendreq.h index f33085e4f4..14100c4136 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.h @@ -159,6 +159,13 @@ get_request_from_send_pending(mca_pml_ob1_send_pending_t *type) (sendreq)->req_recv.pval = NULL; \ } +#define MCA_PML_OB1_SEND_REQUEST_RESET(sendreq) \ +{ \ + size_t _position = 0; \ + opal_convertor_set_position(&sendreq->req_send.req_base.req_convertor, \ + &_position); \ + assert( 0 == _position ); \ +} static inline void mca_pml_ob1_free_rdma_resources(mca_pml_ob1_send_request_t* sendreq) {