[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-197-g029b27c

Service Account noreply at mpich.org
Thu Jul 9 14:39:45 CDT 2015


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  029b27c1e0ab6b8709e724d153b5cca8c65fdc8a (commit)
      from  a849468b5efbf1e0ea4bd82e1fad86c0d9326a43 (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/029b27c1e0ab6b8709e724d153b5cca8c65fdc8a

commit 029b27c1e0ab6b8709e724d153b5cca8c65fdc8a
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Jul 8 13:40:10 2015 -0500

    Remove unused finishpending functions.
    
    MPIDI_CH3U_Comm_FinishPending and MPIDI_CH3U_VC_FinishPending
    functions are unused and incorrect.  We use reference counting to make
    sure we can close connections.
    
    Signed-off-by: Ken Raffenetti <raffenet at mcs.anl.gov>

diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index f579fc3..e05d569 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -1122,10 +1122,6 @@ int MPIDI_CH3_Complete_Acceptq_dequeue(MPIDI_VC_t * vc);
   END MPI PORT SECTION 
   --------------------------*/
 
-/* part of mpid_vc.c, this routine completes any pending operations 
-   on a communicator */
-int MPIDI_CH3U_Comm_FinishPending( MPID_Comm * );
-
 #define MPIDI_MAX_KVS_VALUE_LEN    4096
 
 /* ------------------------------------------------------------------------- */
diff --git a/src/mpid/ch3/src/mpid_comm_disconnect.c b/src/mpid/ch3/src/mpid_comm_disconnect.c
index a115c6e..0f187de 100644
--- a/src/mpid/ch3/src/mpid_comm_disconnect.c
+++ b/src/mpid/ch3/src/mpid_comm_disconnect.c
@@ -34,23 +34,6 @@ int MPID_Comm_disconnect(MPID_Comm *comm_ptr)
         MPIU_ERR_SETANDJUMP(mpi_errno,MPIX_ERR_REVOKED,"**revoked");
     }
 
-    /* Before releasing the communicator, we need to ensure that all VCs are
-       in a stable state.  In particular, if a VC is still in the process of
-       connecting, complete the connection before tearing it down */
-    /* FIXME: How can we get to a state where we are still connecting a VC but
-       the MPIR_Comm_release will find that the ref count decrements to zero 
-       (it may be that some operation fails to increase/decrease the reference 
-       count.  A patch could be to increment the reference count while 
-       connecting, then decrement it.  But the increment in the reference 
-       count should come 
-       from the step that caused the connection steps to be initiated.  
-       Possibility: if the send queue is not empty, the ref count should
-       be higher.  */
-    /* FIXME: This doesn't work yet */
-    /*
-    mpi_errno = MPIDI_CH3U_Comm_FinishPending( comm_ptr );
-    */
-
     /* it's more than a comm_release, but ok for now */
     /* FIXME: Describe what more might be required */
     /* MPIU_PG_Printall( stdout ); */
diff --git a/src/mpid/ch3/src/mpid_vc.c b/src/mpid/ch3/src/mpid_vc.c
index b340534..2b45214 100644
--- a/src/mpid/ch3/src/mpid_vc.c
+++ b/src/mpid/ch3/src/mpid_vc.c
@@ -96,8 +96,6 @@ MPIDI_VCRT_t;
 
  */
 
-static int MPIDI_CH3U_VC_FinishPending( MPIDI_VCRT_t *vcrt );
-
 /*@
   MPID_VCRT_Create - Create a table of VC references
 
@@ -191,12 +189,6 @@ int MPID_VCRT_Release(MPID_VCRT vcrt, int isDisconnect )
     if (!in_use) {
 	int i, inuse;
 
-	/* FIXME: Need a better way to define how vc's are closed that 
-	 takes into account pending operations on vcs, including 
-	 close events received from other processes. */
-	/* mpi_errno = MPIDI_CH3U_VC_FinishPending( vcrt ); */
-        if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-
 	for (i = 0; i < vcrt->size; i++)
 	{
 	    MPIDI_VC_t * const vc = vcrt->vcr_table[i];
@@ -647,100 +639,6 @@ int MPID_PG_ForwardPGInfo( MPID_Comm *peer_ptr, MPID_Comm *comm_ptr,
     goto fn_exit;
 }
 
-#undef FUNCNAME
-#define FUNCNAME MPIDI_CH3U_VC_FinishPending
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-static int MPIDI_CH3U_VC_FinishPending( MPIDI_VCRT_t *vcrt )
-{
-    int mpi_errno = MPI_SUCCESS;
-    MPIDI_VC_t **vc;
-    int i, size, nPending;
-    MPID_Progress_state progress_state; 
-    MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_VC_FINISHPENDING);
-
-    MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_VC_FINISHPENDING);
-
-    do {
-	/* Compute the number of pending ops.
-	   A virtual connection has pending operations if the state
-	   is not INACTIVE or if the sendq is not null */
-	nPending = 0;
-	vc       = vcrt->vcr_table;
-	size     = vcrt->size;
-	/* printf( "Size = %d\n", size ); fflush(stdout); */
-	for (i=0; i<size; i++) {
-	    if (vc[i]->state != MPIDI_VC_STATE_INACTIVE) {
-		/* FIXME: Printf for debugging */
-		printf ("state for vc[%d] is %d\n",
-			i, vc[i]->state ); fflush(stdout);
-		nPending++;
-	    }
-	}
-	if (nPending > 0) {
-	    /* FIXME: See note about printfs above.  It is never valid
-	       to use printfs, even for panic messages */
-	    MPIU_Internal_error_printf( "Panic! %d pending operations!\n", nPending );
-	    /* printf( "Panic! %d pending operations!\n", nPending ); */
-	    fflush(stdout);
-	    MPIU_Assert( nPending == 0 );
-	}
-	else {
-	    break;
-	}
-
-	MPID_Progress_start(&progress_state);
-	MPIU_DBG_MSG_D(CH3_DISCONNECT,VERBOSE,
-		       "Waiting for %d close operations",
-		       nPending);
-	mpi_errno = MPID_Progress_wait(&progress_state);
-	/* --BEGIN ERROR HANDLING-- */
-	if (mpi_errno != MPI_SUCCESS) {
-	    MPID_Progress_end(&progress_state);
-	    MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,
-				"**ch3|close_progress");
-	}
-	/* --END ERROR HANDLING-- */
-	MPID_Progress_end(&progress_state);
-    } while(nPending > 0);
-
- fn_exit:
-    MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3U_VC_FINISHPENDING);
-    return mpi_errno;
- fn_fail:
-    goto fn_exit;
-}
-
-/*
- * MPIDI_CH3U_Comm_FinishPending - Complete any pending operations on the 
- * communicator.  
- *
- * Notes: 
- * This should be used before freeing or disconnecting a communicator.
- *
- * For better scalability, we might want to form a list of VC's with 
- * pending operations.
- */
-#undef FUNCNAME
-#define FUNCNAME MPIDI_CH3U_Comm_FinishPending
-#undef FCNAME
-#define FCNAME MPIDI_QUOTE(FUNCNAME)
-int MPIDI_CH3U_Comm_FinishPending( MPID_Comm *comm_ptr )
-{
-    int mpi_errno = MPI_SUCCESS;
-    MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_COMM_FINISHPENDING);
-
-    MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_COMM_FINISHPENDING);
-
-    mpi_errno = MPIDI_CH3U_VC_FinishPending( comm_ptr->vcrt );
-    if (!mpi_errno && comm_ptr->local_vcrt) {
-	mpi_errno = MPIDI_CH3U_VC_FinishPending( comm_ptr->local_vcrt );
-    }
-
-    MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3U_COMM_FINISHPENDING);
-    return mpi_errno;
-}
-
 /* ----------------------------------------------------------------------- */
 /* Routines to initialize a VC */
 

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

Summary of changes:
 src/mpid/ch3/include/mpidimpl.h         |    4 -
 src/mpid/ch3/src/mpid_comm_disconnect.c |   17 -----
 src/mpid/ch3/src/mpid_vc.c              |  102 -------------------------------
 3 files changed, 0 insertions(+), 123 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list