Skip to content

Commit 202b81d

Browse files
pml/ucx: fix zero sized datatype transfers
Signed-off-by: Aboorva Devarajan <aburvadevarajan@gmail.com>
1 parent 0bcef04 commit 202b81d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/mca/pml/ucx/pml_ucx_datatype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ pml_ucx_datatype_t *mca_pml_ucx_init_nbx_datatype(ompi_datatype_t *datatype,
197197
pml_datatype->op_param.recv.cb.recv = mca_pml_ucx_recv_nbx_completion;
198198

199199
is_contig_pow2 = mca_pml_ucx_datatype_is_contig(datatype) &&
200-
!(size & (size - 1)); /* is_pow2(size) */
200+
(size && !(size & (size - 1))); /* is_pow2(size) */
201201
if (is_contig_pow2) {
202202
pml_datatype->size_shift = (int)(log(size) / log(2.0)); /* log2(size) */
203203
} else {

0 commit comments

Comments
 (0)