Skip to content

Commit 36a35fb

Browse files
committed
pml/cm: Fix call convertor_prepare_for_send to use the right pointer
Previously did not use the right offset and caused data validation issues. Signed-off-by: William Zhang <wilzhang@amazon.com>
1 parent b4355c2 commit 36a35fb

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

ompi/mca/pml/cm/pml_cm.h

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -375,17 +375,12 @@ mca_pml_cm_send(const void *buf,
375375
convertor.flags = ompi_mpi_local_convertor->flags;
376376
convertor.master = ompi_mpi_local_convertor->master;
377377

378-
convertor.local_size = count * datatype->super.size;
379-
convertor.pBaseBuf = (unsigned char*)buf + datatype->super.true_lb;
380-
convertor.count = count;
381-
convertor.pDesc = &datatype->super;
382-
383-
/* Switches off device detection if
384-
MTL set MCA_MTL_BASE_FLAG_ACCELERATOR_INIT_DISABLE during init */
385-
MCA_PML_CM_SWITCH_ACCELERATOR_CONVERTOR_OFF(flags, datatype, count);
386-
convertor.flags |= flags;
387-
/* Sets CONVERTOR_ACCELERATOR flag if device buffer */
388-
opal_convertor_prepare_for_send( &convertor, &datatype->super, count, buf );
378+
/* Switches off device detection if
379+
MTL set MCA_MTL_BASE_FLAG_ACCELERATOR_INIT_DISABLE during init */
380+
MCA_PML_CM_SWITCH_ACCELERATOR_CONVERTOR_OFF(flags, datatype, count);
381+
convertor.flags |= flags;
382+
/* Sets CONVERTOR_ACCELERATOR flag if device buffer */
383+
opal_convertor_prepare_for_send(&convertor, &datatype->super, count, (unsigned char *)buf + datatype->super.true_lb);
389384
} else
390385
#endif
391386
{

0 commit comments

Comments
 (0)