Skip to content

Commit eeb3685

Browse files
committed
osc/rdma: fix typo in compare-and-swap
This commit fixes a typo in compare-and-swap when retrieving the memory region associated with a displacement. It was erroneously 8 bytes instead of the datatype size. This can cause an incorrect RMA range error when the compare-and-swap is less than 4 bytes from the end of the region. Fixed #2080 Signed-off-by: Nathan Hjelm <[email protected]>
1 parent d90babf commit eeb3685

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_accumulate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ int ompi_osc_rdma_compare_and_swap (const void *origin_addr, const void *compare
703703
return OMPI_ERR_RMA_SYNC;
704704
}
705705

706-
ret = osc_rdma_get_remote_segment (module, peer, target_disp, 8, &target_address, &target_handle);
706+
ret = osc_rdma_get_remote_segment (module, peer, target_disp, dt->super.size, &target_address, &target_handle);
707707
if (OPAL_UNLIKELY(OPAL_SUCCESS != ret)) {
708708
return ret;
709709
}

0 commit comments

Comments
 (0)