Skip to content

Commit e94c6b1

Browse files
committed
pml/yalla: fix getting size of a continuous type.
pull request #3765 introduced a bug where the extent of a type is used instead of its size. Signed-off-by: Yossi Itigin <[email protected]>
1 parent b2f90e5 commit e94c6b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ompi/mca/pml/yalla/pml_yalla_datatype.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ OBJ_CLASS_DECLARATION(mca_pml_yalla_convertor_t);
2727
#define PML_YALLA_INIT_MXM_REQ_DATA(_req_base, _buf, _count, _dtype, _stream_type, ...) \
2828
{ \
2929
size_t size; \
30-
ptrdiff_t lb; \
30+
ptrdiff_t lb, extent; \
3131
\
3232
if (opal_datatype_is_contiguous_memory_layout(&(_dtype)->super, _count)) { \
33-
ompi_datatype_get_true_extent(_dtype, &lb, &size); \
33+
ompi_datatype_get_true_extent(_dtype, &lb, &extent); \
34+
ompi_datatype_type_size(_dtype, &size); \
3435
(_req_base)->data_type = MXM_REQ_DATA_BUFFER; \
3536
(_req_base)->data.buffer.ptr = (char *)_buf + lb; \
3637
(_req_base)->data.buffer.length = size * (_count); \

0 commit comments

Comments
 (0)