From 927098d567c88c227694b74adbc20e944c0a2b9a Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 17 Jun 2014 14:53:29 +0000 Subject: [PATCH] osc/rdma: fix hang when accumulating with MPI_REPLACE The replace callback did not increment the incoming frag counter. This leads to a hang during synchronization. This commit adds the increment and also puts the request on the garbage collection list to fix a leak. This fixes a hang found when running the mpich test suite. cmr=v1.8.2:reviewer=bbenton This commit was SVN r32016. --- ompi/mca/osc/rdma/osc_rdma_data_move.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ompi/mca/osc/rdma/osc_rdma_data_move.c b/ompi/mca/osc/rdma/osc_rdma_data_move.c index 14d63490b7..5123558905 100644 --- a/ompi/mca/osc/rdma/osc_rdma_data_move.c +++ b/ompi/mca/osc/rdma/osc_rdma_data_move.c @@ -763,6 +763,16 @@ static int ompi_osc_rdma_acc_op_queue (ompi_osc_rdma_module_t *module, ompi_osc_ static int replace_cb (ompi_request_t *request) { ompi_osc_rdma_module_t *module = (ompi_osc_rdma_module_t *) request->req_complete_cb_data; + int rank = MPI_PROC_NULL; + + if (request->req_status.MPI_TAG & 0x01) { + rank = request->req_status.MPI_SOURCE; + } + + mark_incoming_completion (module, rank); + + /* put this request on the garbage colletion list */ + osc_rdma_gc_add_request (request); /* unlock the accumulate lock */ ompi_osc_rdma_accumulate_unlock (module);