Skip to content

Commit a3e276f

Browse files
authored
Merge pull request #7829 from devreal/osc-rdma-noncontig-requests
osc rdma: check for outstanding transfers before completing a request
2 parents e1e8b2a + 85ed26f commit a3e276f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ompi/mca/osc/rdma/osc_rdma_comm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,10 @@ static void ompi_osc_rdma_put_complete (struct mca_btl_base_module_t *btl, struc
391391
ompi_osc_rdma_request_t *request = request = (ompi_osc_rdma_request_t *) ((intptr_t) context & ~1);
392392
sync = request->sync;
393393

394-
/* NTH -- TODO: better error handling */
395-
ompi_osc_rdma_request_complete (request, status);
394+
if (0 == OPAL_THREAD_ADD_FETCH32 (&request->outstanding_requests, -1)) {
395+
/* NTH -- TODO: better error handling */
396+
ompi_osc_rdma_request_complete (request, status);
397+
}
396398
}
397399

398400
OSC_RDMA_VERBOSE(status ? MCA_BASE_VERBOSE_ERROR : MCA_BASE_VERBOSE_TRACE, "btl put complete on sync %p. local "

0 commit comments

Comments
 (0)