Skip to content

Commit caed3b2

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

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
@@ -422,8 +422,10 @@ static void ompi_osc_rdma_put_complete_flush (struct mca_btl_base_module_t *btl,
422422
ompi_osc_rdma_request_t *request = request = (ompi_osc_rdma_request_t *) ((intptr_t) context & ~1);
423423
module = request->module;
424424

425-
/* NTH -- TODO: better error handling */
426-
ompi_osc_rdma_request_complete (request, status);
425+
if (0 == OPAL_THREAD_ADD_FETCH32 (&request->outstanding_requests, -1)) {
426+
/* NTH -- TODO: better error handling */
427+
ompi_osc_rdma_request_complete (request, status);
428+
}
427429
}
428430

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

0 commit comments

Comments
 (0)