Skip to content

Commit e4b98d7

Browse files
authored
Merge pull request #12797 from wenduwan/fix_bsend
pml/cm,ob1: pack data from application buffer in successive MPI_Start calls
2 parents 0a2d5d4 + 429c7b7 commit e4b98d7

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

ompi/mca/pml/cm/pml_cm_sendreq.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ do { \
375375
iov.iov_base = (IOVBASE_TYPE*)sendreq->req_buff; \
376376
max_data = iov.iov_len = sendreq->req_count; \
377377
iov_count = 1; \
378+
opal_convertor_prepare_for_send( &sendreq->req_send.req_base.req_convertor, \
379+
&sendreq->req_send.req_base.req_datatype->super, \
380+
max_data, \
381+
sendreq->req_addr); \
378382
opal_convertor_pack( &sendreq->req_send.req_base.req_convertor, \
379383
&iov, \
380384
&iov_count, \

ompi/mca/pml/ob1/pml_ob1_start.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,16 @@ int mca_pml_ob1_start(size_t count, ompi_request_t** requests)
8484
sendreq = (mca_pml_ob1_send_request_t *) request;
8585
requests[i] = request;
8686
} else if (sendreq->req_send.req_bytes_packed != 0) {
87-
size_t offset = 0;
8887
/**
8988
* Reset the convertor in case we're dealing with the original
90-
* request, which when completed do not reset the convertor.
89+
* request, which when completed do not reset the convertor but
90+
* leaves it pointing to the buffered send location, with the
91+
* packed datatype and count.
9192
*/
92-
opal_convertor_set_position (&sendreq->req_send.req_base.req_convertor,
93-
&offset);
93+
opal_convertor_prepare_for_send(&sendreq->req_send.req_base.req_convertor,
94+
&sendreq->req_send.req_base.req_datatype->super,
95+
sendreq->req_send.req_base.req_count,
96+
sendreq->req_send.req_base.req_addr);
9497
}
9598

9699
/* reset the completion flag */

0 commit comments

Comments
 (0)