[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1rc2-198-g29711bc
mysql vizuser
noreply at mpich.org
Thu Jan 30 13:02:56 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 29711bc6ffcc28e82c8b90cd9cf5ebae18156d9b (commit)
from f46354acff66cb0cf5ccc134399d9f5b1bc46b31 (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/29711bc6ffcc28e82c8b90cd9cf5ebae18156d9b
commit 29711bc6ffcc28e82c8b90cd9cf5ebae18156d9b
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. Note that the PG finalization
still needs to be the last step since that cleans up all the VCs as
well.
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..4ff6a17 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
@@ -123,6 +112,17 @@ int MPID_Finalize(void)
mpi_errno = MPIDI_CH3_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);
+
/* Tell the process group code that we're done with the process groups.
This will notify PMI (with PMI_Finalize) if necessary. It
also frees all PG structures, including the PG for COMM_WORLD, whose
-----------------------------------------------------------------------
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