Skip to content

Commit 572641d

Browse files
authored
Merge pull request #11075 from wckzhang/fixoffset
mtl: Fix datatype offsetting
2 parents 0119b5a + 17b09d9 commit 572641d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ompi/mca/mtl/base/mtl_base_datatype.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ompi_mtl_datatype_pack(struct opal_convertor_t *convertor,
4646
convertor->count) &&
4747
!(convertor->flags & CONVERTOR_ACCELERATOR)) {
4848
*free_after = false;
49-
*buffer = convertor->pBaseBuf;
49+
*buffer = convertor->pBaseBuf + convertor->bConverted + convertor->pDesc->true_lb;
5050
*buffer_len = convertor->local_size;
5151
return OPAL_SUCCESS;
5252
}

ompi/mca/pml/cm/pml_cm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ mca_pml_cm_send(const void *buf,
374374
MCA_PML_CM_SWITCH_ACCELERATOR_CONVERTOR_OFF(flags, datatype, count);
375375
convertor.flags |= flags;
376376
/* Sets CONVERTOR_ACCELERATOR flag if device buffer */
377-
opal_convertor_prepare_for_send(&convertor, &datatype->super, count, (unsigned char *)buf + datatype->super.true_lb);
377+
opal_convertor_prepare_for_send(&convertor, &datatype->super, count, (unsigned char *)buf);
378378
} else
379379
#endif
380380
{

0 commit comments

Comments
 (0)