From 713a27dc717d29d9d2e54f4481aaf80b85f7a16e Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Sun, 6 Apr 2008 13:48:45 +0000 Subject: [PATCH] Counter of created RDMA channels should be incremented immediately after channel creation (not in control message completion) otherwise more than max_eager_rdma channel may be created. This commit was SVN r18082. --- ompi/mca/btl/openib/btl_openib_endpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mca/btl/openib/btl_openib_endpoint.c b/ompi/mca/btl/openib/btl_openib_endpoint.c index 2eb77e9186..887831e4ee 100644 --- a/ompi/mca/btl/openib/btl_openib_endpoint.c +++ b/ompi/mca/btl/openib/btl_openib_endpoint.c @@ -743,7 +743,6 @@ static void mca_btl_openib_endpoint_eager_rdma_connect_cb( (mca_btl_openib_module_t*)btl; OPAL_THREAD_ADD32(&hca->non_eager_rdma_endpoints, -1); assert(hca->non_eager_rdma_endpoints >= 0); - OPAL_THREAD_ADD32(&openib_btl->eager_rdma_channels, 1); MCA_BTL_IB_FRAG_RETURN(descriptor); } @@ -883,6 +882,7 @@ void mca_btl_openib_endpoint_connect_eager_rdma( p = &hca->eager_rdma_buffers[hca->eager_rdma_buffers_count]; } while(!opal_atomic_cmpset_ptr(p, NULL, endpoint)); + OPAL_THREAD_ADD32(&openib_btl->eager_rdma_channels, 1); /* from this point progress function starts to poll new buffer */ OPAL_THREAD_ADD32(&hca->eager_rdma_buffers_count, 1); return;