From 1e14bb305fa2083c731ce227cd2aa96f6c38028a Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 15 Oct 2008 10:37:20 +0000 Subject: [PATCH] Don't increase num_peers if the operation fails. This commit was SVN r19748. --- ompi/mca/btl/openib/btl_openib.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ompi/mca/btl/openib/btl_openib.c b/ompi/mca/btl/openib/btl_openib.c index 0c79449be2..e8837ac377 100644 --- a/ompi/mca/btl/openib/btl_openib.c +++ b/ompi/mca/btl/openib/btl_openib.c @@ -255,18 +255,21 @@ static int mca_btl_openib_size_queues(struct mca_btl_openib_module_t* openib_btl } rc = adjust_cq(device, BTL_OPENIB_HP_CQ); - if (OMPI_SUCCESS != rc) + if (OMPI_SUCCESS != rc) { goto out; + } rc = adjust_cq(device, BTL_OPENIB_LP_CQ); - if (OMPI_SUCCESS != rc) + if (OMPI_SUCCESS != rc) { goto out; + } - if(0 == openib_btl->num_peers) + if (0 == openib_btl->num_peers) { rc = create_srq(openib_btl); + } -out: openib_btl->num_peers += nprocs; +out: return rc; }