[mpich2-commits] r9554 - in mpich2/trunk/src/mpi: comm topo

goodell at mcs.anl.gov goodell at mcs.anl.gov
Wed Feb 29 14:59:20 CST 2012


Author: goodell
Date: 2012-02-29 14:59:20 -0600 (Wed, 29 Feb 2012)
New Revision: 9554

Modified:
   mpich2/trunk/src/mpi/comm/comm_split.c
   mpich2/trunk/src/mpi/comm/commutil.c
   mpich2/trunk/src/mpi/topo/dist_gr_create.c
Log:
improve coverage annotations

This was a pretty scattershot pass to fix a few missing annotations
and improve our coverage rates.  A more concerted and systematic
approach will be needed if we wish to substantially drive towards
100% coverage.

No reviewer.

Modified: mpich2/trunk/src/mpi/comm/comm_split.c
===================================================================
--- mpich2/trunk/src/mpi/comm/comm_split.c	2012-02-29 17:27:23 UTC (rev 9553)
+++ mpich2/trunk/src/mpi/comm/comm_split.c	2012-02-29 20:59:20 UTC (rev 9554)
@@ -51,7 +51,9 @@
     else if (s1->orig_idx < s2->orig_idx)
         return -1;
 
+    /* --BEGIN ERROR HANDLING-- */
     return 0; /* should never happen */
+    /* --END ERROR HANDLING-- */
 }
 
 /* Sort the entries in keytable into increasing order by key.  A stable
@@ -74,6 +76,7 @@
     else
 #endif
     {
+        /* --BEGIN USEREXTENSION-- */
         /* fall through to insertion sort if qsort is unavailable/disabled */
         for (i = 1; i < size; ++i) {
             tmp = keytable[i];
@@ -91,6 +94,7 @@
             }
             keytable[j+1] = tmp;
         }
+        /* --END USEREXTENSION-- */
     }
 }
 

Modified: mpich2/trunk/src/mpi/comm/commutil.c
===================================================================
--- mpich2/trunk/src/mpi/comm/commutil.c	2012-02-29 17:27:23 UTC (rev 9553)
+++ mpich2/trunk/src/mpi/comm/commutil.c	2012-02-29 20:59:20 UTC (rev 9554)
@@ -282,9 +282,12 @@
                 break;
             case MPID_HIERARCHY_NODE_ROOTS:
                 break;
+
+                /* --BEGIN ERROR HANDLING-- */
             default:
                 MPIU_Assertp(FALSE);
                 break;
+                /* --END ERROR HANDLING-- */
         }
 
         default_collops[i] = ops;
@@ -322,9 +325,11 @@
     MPIU_CHKPMEM_COMMIT();
 fn_exit:
     return mpi_errno;
+    /* --BEGIN ERROR HANDLING-- */
 fn_fail:
     MPIU_CHKPMEM_REAP();
     goto fn_exit;
+    /* --END ERROR HANDLING-- */
 }
 
 /* Initializes the coll_fns field of comm to a sensible default.  It may re-use
@@ -401,6 +406,7 @@
                                                  &num_local,    &local_rank,    &local_procs,
                                                  &num_external, &external_rank, &external_procs,
                                                  &comm->intranode_table, &comm->internode_table);
+        /* --BEGIN ERROR HANDLING-- */
         if (mpi_errno) {
             if (MPIR_Err_is_fatal(mpi_errno)) MPIU_ERR_POP(mpi_errno);
 
@@ -415,6 +421,7 @@
             mpi_errno = MPI_SUCCESS;
             goto fn_exit;
         }
+        /* --END ERROR HANDLING-- */
 
         /* defensive checks */
         MPIU_Assert(num_local > 0);
@@ -940,6 +947,7 @@
 	    if (mpi_errno) MPIU_ERR_POP(mpi_errno);
             MPIU_ERR_CHKANDJUMP(errflag, mpi_errno, MPI_ERR_OTHER, "**coll_fail");
 	    if (totalHasNoId == 1) {
+                /* --BEGIN ERROR HANDLING-- */
 		/* Release the mask for use by other threads */
 		if (own_mask) {
                     MPIU_THREAD_CS_ENTER(CONTEXTID,);
@@ -947,6 +955,7 @@
                     MPIU_THREAD_CS_EXIT(CONTEXTID,);
 		}
 		MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**toomanycomm");
+                /* --END ERROR HANDLING-- */
 	    }
 	    else { /* reinitialize testCount */
 		testCount = 10;
@@ -961,12 +970,15 @@
     MPIU_DBG_MSG_S(COMM,VERBOSE,"Context mask = %s",MPIR_ContextMaskToStr());
     MPID_MPI_FUNC_EXIT(MPID_STATE_MPIR_GET_CONTEXTID);
     return mpi_errno;
+
+    /* --BEGIN ERROR HANDLING-- */
 fn_fail:
     /* Release the masks */
     if (own_mask) {
         mask_in_use = 0;
     }
     goto fn_exit;
+    /* --END ERROR HANDLING-- */
 }
 #endif
 
@@ -1067,6 +1079,7 @@
 	MPID_Abort( 0, MPI_ERR_INTERN, 1, 
 		    "In MPIR_Free_contextid, idx is out of range" );
     }
+    /* --END ERROR HANDLING-- */
 
     /* The low order bits for dynamic context IDs don't have meaning the
      * same way that low bits of non-dynamic ctx IDs do.  So we have to
@@ -1094,6 +1107,7 @@
         }
     }
 
+    /* --BEGIN ERROR HANDLING-- */
     /* Check that this context id has been allocated */
     if ( (context_mask[idx] & (0x1 << bitpos)) != 0 ) {
 #ifdef USE_DBG_LOGGING

Modified: mpich2/trunk/src/mpi/topo/dist_gr_create.c
===================================================================
--- mpich2/trunk/src/mpi/topo/dist_gr_create.c	2012-02-29 17:27:23 UTC (rev 9553)
+++ mpich2/trunk/src/mpi/topo/dist_gr_create.c	2012-02-29 20:59:20 UTC (rev 9554)
@@ -397,6 +397,7 @@
     MPIU_THREAD_CS_EXIT(ALLFUNC,);
     return mpi_errno;
 
+    /* --BEGIN ERROR HANDLING-- */
   fn_fail:
     if (dist_graph_ptr && dist_graph_ptr->in)
         MPIU_Free(dist_graph_ptr->in);
@@ -407,7 +408,6 @@
     if (dist_graph_ptr && dist_graph_ptr->out_weights)
         MPIU_Free(dist_graph_ptr->out_weights);
     MPIU_CHKPMEM_REAP();
-    /* --BEGIN ERROR HANDLING-- */
 #ifdef HAVE_ERROR_CHECKING
     mpi_errno = MPIR_Err_create_code(
         mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER,



More information about the mpich2-commits mailing list