diff --git a/ompi/mca/pml/cm/pml_cm_sendreq.h b/ompi/mca/pml/cm/pml_cm_sendreq.h index 5ee0ebed06f..97daa53e681 100644 --- a/ompi/mca/pml/cm/pml_cm_sendreq.h +++ b/ompi/mca/pml/cm/pml_cm_sendreq.h @@ -372,6 +372,10 @@ do { \ iov.iov_base = (IOVBASE_TYPE*)sendreq->req_buff; \ max_data = iov.iov_len = sendreq->req_count; \ iov_count = 1; \ + opal_convertor_prepare_for_send( &sendreq->req_send.req_base.req_convertor, \ + &sendreq->req_send.req_base.req_datatype->super, \ + max_data, \ + sendreq->req_addr); \ opal_convertor_pack( &sendreq->req_send.req_base.req_convertor, \ &iov, \ &iov_count, \ diff --git a/ompi/mca/pml/ob1/pml_ob1_start.c b/ompi/mca/pml/ob1/pml_ob1_start.c index ebc4050d4de..672656382d0 100644 --- a/ompi/mca/pml/ob1/pml_ob1_start.c +++ b/ompi/mca/pml/ob1/pml_ob1_start.c @@ -87,13 +87,16 @@ int mca_pml_ob1_start(size_t count, ompi_request_t** requests) sendreq = (mca_pml_ob1_send_request_t *) request; requests[i] = request; } else if (sendreq->req_send.req_bytes_packed != 0) { - size_t offset = 0; /** * Reset the convertor in case we're dealing with the original - * request, which when completed do not reset the convertor. + * request, which when completed do not reset the convertor but + * leaves it pointing to the buffered send location, with the + * packed datatype and count. */ - opal_convertor_set_position (&sendreq->req_send.req_base.req_convertor, - &offset); + opal_convertor_prepare_for_send(&sendreq->req_send.req_base.req_convertor, + &sendreq->req_send.req_base.req_datatype->super, + sendreq->req_send.req_base.req_count, + sendreq->req_send.req_base.req_addr); } /* reset the completion flag */