diff --git a/ompi/mca/pml/cm/pml_cm_sendreq.h b/ompi/mca/pml/cm/pml_cm_sendreq.h index a9613057c48..4872943c05a 100644 --- a/ompi/mca/pml/cm/pml_cm_sendreq.h +++ b/ompi/mca/pml/cm/pml_cm_sendreq.h @@ -375,6 +375,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 41795e007e5..311866e4014 100644 --- a/ompi/mca/pml/ob1/pml_ob1_start.c +++ b/ompi/mca/pml/ob1/pml_ob1_start.c @@ -84,13 +84,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 */