Skip to content

Commit 85ed26f

Browse files
committed
osc rdma: check for outstanding fragments before completing a request
Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
1 parent 283cfbf commit 85ed26f

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)