[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.2-99-gc3ab4ae

Service Account noreply at mpich.org
Wed Aug 20 04:54:18 CDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  c3ab4aee1256f18b7e7e791ba758c08431acc71c (commit)
      from  e9d8bfc07a24e4ebd8b65f578317cae60af0e20c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/c3ab4aee1256f18b7e7e791ba758c08431acc71c

commit c3ab4aee1256f18b7e7e791ba758c08431acc71c
Author: Norio Yamaguchi <norio.yamaguchi at riken.jp>
Date:   Wed Aug 20 10:05:32 2014 +0900

    Fix memory leak in netmod-IB
    
    Some memories allocated in an initialization process are not
    released if all processes use shared memory for communication.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_init.c b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_init.c
index fba362b..4f8b5bc 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ib/ib_init.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ib/ib_init.c
@@ -606,12 +606,19 @@ int MPID_nem_ib_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_m
     /* We need to communicate with all other ranks in close sequence.  */
     MPID_nem_ib_conns_ref_count = MPID_nem_ib_nranks - MPID_nem_mem_region.num_local;
 
+    if (MPID_nem_ib_conns_ref_count == 0) {
+        MPIU_Free(MPID_nem_ib_conns);
+    }
+
     for (i = 0; i < MPID_nem_mem_region.num_local; i++) {
         if (MPID_nem_mem_region.local_procs[i] != MPID_nem_ib_myrank) {
             ibcom_errno =
                 MPID_nem_ib_com_close(MPID_nem_ib_scratch_pad_fds
                                       [MPID_nem_mem_region.local_procs[i]]);
-            MPID_nem_ib_scratch_pad_fds_ref_count--;
+            if (--MPID_nem_ib_scratch_pad_fds_ref_count == 0) {
+                MPIU_Free(MPID_nem_ib_scratch_pad_fds);
+                MPIU_Free(MPID_nem_ib_scratch_pad_ibcoms);
+            }
         }
     }
 #endif

-----------------------------------------------------------------------

Summary of changes:
 src/mpid/ch3/channels/nemesis/netmod/ib/ib_init.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list