[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1rc2-191-g058c8bf

mysql vizuser noreply at mpich.org
Wed Jan 29 13:31:33 CST 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  058c8bf0faa313029f396459adde878786f1c41f (commit)
      from  a6652e0fd719a7ecb6fbe0b593b20d6e493f8368 (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/058c8bf0faa313029f396459adde878786f1c41f

commit 058c8bf0faa313029f396459adde878786f1c41f
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Wed Jan 29 12:48:41 2014 -0600

    Move communicator destruction to after progress checks.
    
    During finalize, we were destroying the COMM_WORLD, COMM_SELF and
    COMM_IWORLD communicator objects, and all other associated resources
    internally, before waiting for the final progress checks for incoming
    messages finished.  This resulted in the following sequence of cleanup:
    
    1. COMM_WORLD got cleaned up.  Internally, there is a check to see if
    a group object has been allocated for COMM_WORLD.  If there is one, it
    is freed up.
    
    2. We waited for other messages to arrive.  We noticed a failure at
    this time, so we try to create a failed process group.  This uses the
    COMM_WORLD group internally, causing it to be created again, but with
    a reference count of 2, since the code assumes that the first
    reference count is always for the original COMM_WORLD.
    
    3. When we try to free the world group, we notice that the reference
    count is 2, so we decrement the reference count and not actually free
    the object.
    
    Moving the check for incoming messages to happen before the
    communicator free fixes this problem.
    
    See #1996
    
    Signed-off-by: Wesley Bland <wbland at mcs.anl.gov>

diff --git a/src/mpid/ch3/src/mpid_finalize.c b/src/mpid/ch3/src/mpid_finalize.c
index 1a1ad98..a959339 100644
--- a/src/mpid/ch3/src/mpid_finalize.c
+++ b/src/mpid/ch3/src/mpid_finalize.c
@@ -93,17 +93,6 @@ int MPID_Finalize(void)
       *    cancel it, in which case an error shouldn't be generated.
       */
     
-#ifdef MPID_NEEDS_ICOMM_WORLD
-    mpi_errno = MPIR_Comm_release_always(MPIR_Process.icomm_world, 0);
-    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-#endif
-
-    mpi_errno = MPIR_Comm_release_always(MPIR_Process.comm_self, 0);
-    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
-    mpi_errno = MPIR_Comm_release_always(MPIR_Process.comm_world, 0);
-    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
-
     /* Re-enabling the close step because many tests are failing
      * without it, particularly under gforker */
 #if 1
@@ -130,6 +119,17 @@ int MPID_Finalize(void)
     mpi_errno = MPIDI_PG_Finalize();
     if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
 
+#ifdef MPID_NEEDS_ICOMM_WORLD
+    mpi_errno = MPIR_Comm_release_always(MPIR_Process.icomm_world, 0);
+    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+#endif
+
+    mpi_errno = MPIR_Comm_release_always(MPIR_Process.comm_self, 0);
+    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
+    mpi_errno = MPIR_Comm_release_always(MPIR_Process.comm_world, 0);
+    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
+
 #ifndef MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS
     MPIDI_CH3_FreeParentPort();
 #endif

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

Summary of changes:
 src/mpid/ch3/src/mpid_finalize.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list