[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-32-g606f9b6

Service Account noreply at mpich.org
Thu Dec 17 16:11:31 CST 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  606f9b687230dcd3537e538e6983f8e7b573cd76 (commit)
       via  c5c31f19b4eb5eec8a3eaee19581d56870ce3d2b (commit)
      from  12c4cd9c859933cf297fa033bb6637ad79ec521a (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/606f9b687230dcd3537e538e6983f8e7b573cd76

commit 606f9b687230dcd3537e538e6983f8e7b573cd76
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Tue Dec 15 23:06:56 2015 -0600

    src/util: delete unused code
    
    Signed-off-by: Halim Amer <aamer at anl.gov>

diff --git a/src/util/Makefile.mk b/src/util/Makefile.mk
index 6714fe0..b7d54e7 100644
--- a/src/util/Makefile.mk
+++ b/src/util/Makefile.mk
@@ -6,10 +6,8 @@
 ##
 
 include $(top_srcdir)/src/util/dbg/Makefile.mk
-include $(top_srcdir)/src/util/instrm/Makefile.mk
 include $(top_srcdir)/src/util/logging/Makefile.mk
 include $(top_srcdir)/src/util/mem/Makefile.mk
-include $(top_srcdir)/src/util/other/Makefile.mk
 include $(top_srcdir)/src/util/cvar/Makefile.mk
 include $(top_srcdir)/src/util/procmap/Makefile.mk
 include $(top_srcdir)/src/util/thread/Makefile.mk
diff --git a/src/util/dbg/Makefile.mk b/src/util/dbg/Makefile.mk
index 45be049..babd837 100644
--- a/src/util/dbg/Makefile.mk
+++ b/src/util/dbg/Makefile.mk
@@ -10,5 +10,4 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/util/dbg
 noinst_HEADERS += src/util/dbg/mpidbg.h
 
 mpi_core_sources += \
-    src/util/dbg/dbg_printf.c     \
-    src/util/dbg/timelimit.c
+    src/util/dbg/dbg_printf.c
diff --git a/src/util/dbg/dbg_control.c b/src/util/dbg/dbg_control.c
deleted file mode 100644
index 574b775..0000000
--- a/src/util/dbg/dbg_control.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-#include "mpichconf.h"
-#include "mpimem.h"
-#include <string.h>
-
-/* FIXME: Delete this file (functionality switched to MPIU_DBG_MSG interface */
-
-#define MAX_DEBUG_NAME 256
-/* 
-   This routine checks the argument against the value of the environment
-   variable MPICH_DEBUG_ITEM, and if they are the same, returns 1.
-   Otherwise, returns 0.
-*/
-int MPIR_IDebug( const char *str )
-{
-    static int needEnvValue = 1;
-    const char *d;
-    static char debugName[MAX_DEBUG_NAME];
-
-    if (needEnvValue) {
-	d = getenv( "MPICH_DEBUG_ITEM" );
-	if (d) {
-	    /* Make a copy */
-	    MPIU_Strncpy( debugName, d, MAX_DEBUG_NAME );
-	}
-	else {
-	    debugName[0] = 0;
-	}
-	needEnvValue = 0;
-    }
-    return strcmp( debugName, str ) == 0;
-}
-
diff --git a/src/util/dbg/timelimit.c b/src/util/dbg/timelimit.c
deleted file mode 100644
index ee92155..0000000
--- a/src/util/dbg/timelimit.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-#include "mpiimpl.h"
-
-#include <sys/time.h>
-/* 
- * This file provides a time-limit capability.
- * NOT YET COMPLETE
- */
-
-/* 
-   Generate a SIGALRM after the specified number of seconds.
-   If seconds is zero, turn off the alarm 
-*/
-void MPIU_SetTimeout( int seconds )
-{
-#ifdef HAVE_SETITIMER
-    struct itimerval timelimit;
-    struct timeval tval;
-    struct timeval tzero;
-
-    if (seconds > 0) {
-	tzero.tv_sec	      = 0;
-	tzero.tv_usec	      = 0;
-	tval.tv_sec	      = seconds;
-	tval.tv_usec	      = 0;
-	timelimit.it_interval = tzero;       /* Only one alarm */
-	timelimit.it_value    = tval;
-	setitimer( ITIMER_REAL, &timelimit, 0 );
-    }
-    else {
-	tzero.tv_sec	  = 0;
-	tzero.tv_usec	  = 0;
-	timelimit.it_value	  = tzero;   /* Turn off timer */
-	setitimer( ITIMER_REAL, &timelimit, 0 );
-    }
-    
-#elif defined(HAVE_ALARM)
-    /* alarm(0) turns off the alarm */
-    alarm( seconds );
-#else
-#error "No timer available"    
-#endif
-}
-
-
diff --git a/src/util/instrm/Makefile.mk b/src/util/instrm/Makefile.mk
deleted file mode 100644
index f2ae72c..0000000
--- a/src/util/instrm/Makefile.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-## -*- Mode: Makefile; -*-
-## vim: set ft=automake :
-##
-## (C) 2011 by Argonne National Laboratory.
-##     See COPYRIGHT in top-level directory.
-##
-
-mpi_core_sources += \
-    src/util/instrm/instr.c
-
diff --git a/src/util/instrm/instr.c b/src/util/instrm/instr.c
deleted file mode 100644
index 5e007d0..0000000
--- a/src/util/instrm/instr.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-#include "mpiimpl.h"
-
-MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING;
-
-#ifdef USE_MPIU_INSTR
-
-static int MPIU_INSTR_Printf( FILE *fp );
-static int MPIU_INSTR_Finalize( void *p );
-
-/* */
-/*
- * Basic but general support for instrumentation hooks in MPICH
- *
- * Most actions are handled by MPIU_INSTR_xxx macros (to permit both lowest
- * overhead and to allow instrumentation to be selected at compile time.
- */
-static struct MPIU_INSTR_Generic_t *instrHead = 0, *instrTail = 0;
-
-int MPIU_INSTR_AddHandle( void *handlePtr )
-{
-    struct MPIU_INSTR_Generic_t *gPtr = 
-	(struct MPIU_INSTR_Generic_t *)handlePtr;
-
-    /* Note that Addhandle must be within a thread-safe initialization */
-    if (!instrHead) {
-	/* Make sure that this call back occurs early (before MPID_Finalize) */
-	MPIR_Add_finalize( MPIU_INSTR_Finalize, stdout,
-			   MPIR_FINALIZE_CALLBACK_PRIO + 2 );
-    }
-
-    if (instrHead) {
-	instrTail->next = gPtr;
-    }
-    else {
-	instrHead       = gPtr;
-    }
-    instrTail       = gPtr;
-    return 0;
-}
-
-#define MAX_INSTR_BUF 1024
-static int MPIU_INSTR_Printf( FILE *fp )
-{
-    struct MPIU_INSTR_Generic_t *gPtr = instrHead;
-    char instrBuf[MAX_INSTR_BUF];
-    
-    while (gPtr) {
-	/* We only output information on events that occured */
-	if (gPtr->count) {
-	    if (gPtr->toStr) {
-		(*gPtr->toStr)( instrBuf, sizeof(instrBuf), gPtr );
-	    }
-	    else {
-		if (gPtr->desc) {
-		    MPIU_Strncpy( instrBuf, gPtr->desc, sizeof(instrBuf) );
-		}
-		else {
-		    /* This should not happen */
-		    MPIU_Strncpy( instrBuf, "", sizeof(instrBuf) );
-		}
-	    }
-	    fputs( instrBuf, fp );
-	    fputc( '\n', fp );
-	}
-	gPtr = gPtr->next;
-    }
-    fflush( fp );
-    return 0;
-}
-
-static int MPIU_INSTR_Finalize( void *p )
-{
-    int rc;
-    struct MPIU_INSTR_Generic_t *gPtr = instrHead;
-    /* FIXME: This should at least issue the writes in process order */
-    /* Allow whether output is generated to be controlled */
-    if (!MPL_env2bool( "MPICH_INSTR_AT_FINALIZE", &rc )) 
-	rc = 0;
-
-    if (rc) {
-	MPIU_INSTR_Printf( stdout );
-    }
-
-    /* Free any memory allocated for the descriptions */
-    while (gPtr) {
-	if (gPtr->desc) {
-	    MPIU_Free( (char *)gPtr->desc );
-	    gPtr->desc = 0;
-	}
-	gPtr = gPtr->next;
-    }
-    
-    return 0;
-}
-
-/*
- * Standard print routines for the instrumentation objects
- */
-
-/* 
- * Print a duration, which may have extra integer fields.  Those fields
- * are printed as integers, in order, separate by tabs
- */
-int MPIU_INSTR_ToStr_Duration_Count( char *buf, size_t maxBuf, void *ptr )
-{
-    double ttime;
-    struct MPIU_INSTR_Duration_count_t *dPtr = 
-	(struct MPIU_INSTR_Duration_count_t *)ptr;
-    MPID_Wtime_todouble( &dPtr->ttime, &ttime );
-    snprintf( buf, maxBuf, "%-40s:\t%d\t%e", dPtr->desc, dPtr->count, ttime );
-    if (dPtr->nitems) {
-	char *p;
-	size_t  len = strlen(buf);
-	int  i;
-	/* Add each integer value, separated by a tab. */
-	maxBuf -= len;
-	p       = buf + len;
-	for (i=0; i<dPtr->nitems; i++) {
-	    snprintf( p, maxBuf, "\t%d", dPtr->data[i] );
-	    len     = strlen(p);
-	    maxBuf -= len;
-	    p      += len;
-	}
-    }
-    return 0;
-}
-
-/* Print the max counter value and the total counter value. */
-int MPIU_INSTR_ToStr_Counter( char * buf, size_t maxBuf, void *ptr )
-{
-    struct MPIU_INSTR_Counter_t *dPtr = 
-	(struct MPIU_INSTR_Counter_t *)ptr;
-    snprintf( buf, maxBuf, "%-40s:\t%d\t%d", 
-	      dPtr->desc, dPtr->maxcount, dPtr->totalcount );
-    return 0;
-}
-
-#else
-/* No routines required if instrumentation is not selected */
-#endif
diff --git a/src/util/other/Makefile.mk b/src/util/other/Makefile.mk
deleted file mode 100644
index 25204c0..0000000
--- a/src/util/other/Makefile.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-## -*- Mode: Makefile; -*-
-## vim: set ft=automake :
-##
-## (C) 2011 by Argonne National Laboratory.
-##     See COPYRIGHT in top-level directory.
-##
-
-mpi_core_sources += \
-    src/util/other/outliers.c     \
-    src/util/other/assert.c
-
diff --git a/src/util/other/outliers.c b/src/util/other/outliers.c
deleted file mode 100644
index cac6190..0000000
--- a/src/util/other/outliers.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
-/*
- *  (C) 2001 by Argonne National Laboratory.
- *      See COPYRIGHT in top-level directory.
- */
-
-#include "mpiimpl.h"
-#include <stdlib.h>
-#include <assert.h>
-
-#define GROUPSIZE 5
-
-/* Insertion sort on array 'a' containing n elements */
-static inline void isort(int a[], const int n)
-{
-    int i;
-    int j;
-    int key;
-
-    for (j = 1; j < n; ++j) {
-	key = a[j];
-	i = j - 1;
-	while (i >= 0 && a[i] > key) {
-	    a[i+1] = a[i];
-	    i -= 1;
-	}
-	a[i+1] = key;
-    }
-}
-
-
-/* Partition array 'a' of size n around the value pivot and returns
- * the index of the pivot point */
-static inline int partition(const int pivot, int a[], const int n)
-{
-    int i = 0;
-    int j = n-1;
-    int tmp;
-
-    while (1) {
-	while ((j > 0) && (a[j] < pivot)) --j;
-	while ((i < n) && (a[i] >= pivot)) ++i;
-
-	if (i < j) {
-	    tmp = a[i];
-	    a[i] = a[j];
-	    a[j] = tmp;
-	}
-	else {
-	    return j;
-	}
-    }
-}
-
-
-/* This does all of the work for k_select */
-static void k_select_r(const int k, int a[], const int n, int *value)
-{
-    int ngroups;
-    int i;
-    int median_median;
-    int surfeit;
-    int mk;
-    int *medians;
-
-    assert (k < n);
-    ngroups = (n + GROUPSIZE-1) / GROUPSIZE;
-    medians = MPIU_Malloc(ngroups * sizeof (int));
-
-    /* Divide 'a' into groups, sort the elements of each group and
-       pull out the median of each group */
-    for (i = 0; i < ngroups-1; ++i) {
-	isort(&a[i * GROUPSIZE], GROUPSIZE);
-	medians[i] = a[i*GROUPSIZE + GROUPSIZE/2];
-    }
-    surfeit = (n - i * GROUPSIZE);
-    isort(&a[i * GROUPSIZE], surfeit);
-    medians[i] = a[i*GROUPSIZE + surfeit/2];
-
-    if (ngroups == 1) {
-	*value = a[n - 1 - k];
-	MPIU_Free(medians);
-	return;
-    }
-
-    /* use k_select to find the median of medians */
-    k_select_r((ngroups / 2) - 1 + (ngroups % 2), medians, ngroups, &median_median);
-    MPIU_Free(medians);
-
-    /* partition array a around the median of medians and return the
-       index of the median of medians */
-    mk = partition(median_median, a, n);
-
-    /* if this is the last element, we're done */
-    if (mk == n - 1)
-	*value = a[mk];
-    else if (k <= mk)
-	/* call k_select to find the kth element in a[0..mk-1] (the
-	   array up to the element before the median of medians) */
-	k_select_r(k, &a[0], mk + 1, value);
-    else
-	/* call k_select to find the (k-mk)th element in a[mk+1..n] (the
-	   array starting from the element after the median of medians) */
-	k_select_r(k - (mk+1), &a[mk+1], n - (mk+1), value);
-}
-
-
-/* Returns the value of the kth smallest element in array a of size
- * n. Allocates an array and calls the recursive function k_select_r
- * which does all the work */
-static void k_select(const int k, int a[], const int n, int *value)
-{
-    k_select_r(k - 1, a, n, value);
-}
-
-/* silence "no previous prototype" warnings */
-int MPIU_Outlier_ratio(int * sizes, int n_sizes, double outlier_frac, double threshold);
-
-/* Returns the ratio of the maximum size and the outlier_frac
- * percentile size. */
-int MPIU_Outlier_ratio(int * sizes, int n_sizes, double outlier_frac, double threshold)
-{
-    int max, k_max, i;
-    double retval;
-
-    k_select(n_sizes, sizes, n_sizes, &max);
-    max = sizes[0];
-    for (i = 0; i < n_sizes; i++)
-	if (max < sizes[i])
-	    max = sizes[i];
-    k_select((int) (n_sizes * outlier_frac), sizes, n_sizes, &k_max);
-    retval = (double) max / k_max;
-
-    if (retval > threshold) {
-	return 1;
-    }
-    else {
-	return 0;
-    }
-}

http://git.mpich.org/mpich.git/commitdiff/c5c31f19b4eb5eec8a3eaee19581d56870ce3d2b

commit c5c31f19b4eb5eec8a3eaee19581d56870ce3d2b
Author: Ken Raffenetti <raffenet at mcs.anl.gov>
Date:   Tue Dec 15 23:05:53 2015 -0600

    src/util: move assert code to same directory
    
    Signed-off-by: Halim Amer <aamer at anl.gov>

diff --git a/src/util/assert/Makefile.mk b/src/util/assert/Makefile.mk
index 1548e21..94771fa 100644
--- a/src/util/assert/Makefile.mk
+++ b/src/util/assert/Makefile.mk
@@ -8,5 +8,5 @@
 AM_CPPFLAGS += -I$(top_srcdir)/src/util/assert
 
 noinst_HEADERS += src/util/assert/mpiassert.h
-mpi_core_sources +=
+mpi_core_sources += src/util/assert/assert.c
 
diff --git a/src/util/other/assert.c b/src/util/assert/assert.c
similarity index 100%
rename from src/util/other/assert.c
rename to src/util/assert/assert.c

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

Summary of changes:
 src/util/Makefile.mk                |    2 -
 src/util/assert/Makefile.mk         |    2 +-
 src/util/{other => assert}/assert.c |    0
 src/util/dbg/Makefile.mk            |    3 +-
 src/util/dbg/dbg_control.c          |   38 ---------
 src/util/dbg/timelimit.c            |   50 ------------
 src/util/instrm/Makefile.mk         |   10 ---
 src/util/instrm/instr.c             |  146 -----------------------------------
 src/util/other/Makefile.mk          |   11 ---
 src/util/other/outliers.c           |  140 ---------------------------------
 10 files changed, 2 insertions(+), 400 deletions(-)
 rename src/util/{other => assert}/assert.c (100%)
 delete mode 100644 src/util/dbg/dbg_control.c
 delete mode 100644 src/util/dbg/timelimit.c
 delete mode 100644 src/util/instrm/Makefile.mk
 delete mode 100644 src/util/instrm/instr.c
 delete mode 100644 src/util/other/Makefile.mk
 delete mode 100644 src/util/other/outliers.c


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list