Skip to content

Commit 34b0a4f

Browse files
authored
Merge pull request #1859 from hjelmn/rdma_fixes
osc/rdma: fix bug in CAS
2 parents 44f01b4 + b47208e commit 34b0a4f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_accumulate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,11 @@ static void ompi_osc_rdma_cas_get_complete (struct mca_btl_base_module_t *btl, s
564564
if (OMPI_SUCCESS == status) {
565565
/* copy data to the user buffer (for gacc) */
566566
memcpy (request->result_addr, (void *) source, request->len);
567-
memcpy ((void *) source, request->origin_addr, request->len);
568567

569568
if (0 == memcmp ((void *) source, request->compare_addr, request->len)) {
570569
/* the target and compare buffers match so write the source to the target */
570+
memcpy ((void *) source, request->origin_addr, request->len);
571+
571572
ret = module->selected_btl->btl_put (module->selected_btl, peer->data_endpoint, local_address,
572573
request->target_address, local_handle,
573574
(mca_btl_base_registration_handle_t *) request->ctx,

0 commit comments

Comments
 (0)