Changes to OTF:
authorjurenz
Thu Mar 21 11:25:05 2013 +0000 (2 months ago)
changeset 2151353f48f04926d
parent 21512 f97dfc062bab
child 21514 0731cae33eef
Changes to OTF:
- general: Fixed several Coverity warnings
- otfprofile: Do not show helptext if '-V' given
- otfinfo: Fixed counting of collective operations and markers
ompi/contrib/vt/vt/extlib/otf/ChangeLog
ompi/contrib/vt/vt/extlib/otf/tools/otfcompress/otfcompress.c
ompi/contrib/vt/vt/extlib/otf/tools/otfinfo/handler.c
ompi/contrib/vt/vt/extlib/otf/tools/otfinfo/handler.h
ompi/contrib/vt/vt/extlib/otf/tools/otfinfo/otfinfo.c
ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/comparison_kmeans.cpp
ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/create_csv.cpp
ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/create_filter.h
ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/create_latex.cpp
ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/datastructs.h
ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/otfprofile.cpp
ompi/contrib/vt/vt/extlib/otf/tools/otfshrink/otfshrink.cpp
     1.1 --- a/ompi/contrib/vt/vt/extlib/otf/ChangeLog	Thu Mar 21 11:15:06 2013 +0000
     1.2 +++ b/ompi/contrib/vt/vt/extlib/otf/ChangeLog	Thu Mar 21 11:25:05 2013 +0000
     1.3 @@ -2,6 +2,8 @@
     1.4  	- otfprofile, LaTeX output:
     1.5  		- swapped x & y axis of the Message Data Rate Matrix
     1.6  		- adapted labels to Vampir
     1.7 +	- otfinfo:
     1.8 +		- fixed counting of collective operations and markers
     1.9  
    1.10  1.12.2openmpi
    1.11  	- fixed conflicts with OpenType Fonts:
     2.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfcompress/otfcompress.c	Thu Mar 21 11:15:06 2013 +0000
     2.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfcompress/otfcompress.c	Thu Mar 21 11:25:05 2013 +0000
     2.3 @@ -459,7 +459,7 @@
     2.4  		level, blocksize, 
     2.5  		(unsigned long long) totalout, 
     2.6  		(unsigned long long) totalin, 
     2.7 -		100.0 * ((double) totalout) / ((double) totalin), 
     2.8 +		100.0 * ((double) totalout) / (double)((0 < totalin) ? totalin : 1),
     2.9  		time );
    2.10  
    2.11  	deflateEnd( &z );
    2.12 @@ -582,7 +582,7 @@
    2.13  		blocksize, 
    2.14  		(unsigned long long) totalin, 
    2.15  		(unsigned long long) totalout, 
    2.16 -		100.0 * ((double) totalin) / ((double) totalout), 
    2.17 +		100.0 * ((double) totalin) / (double)((0 < totalout) ? totalout : 1), 
    2.18  		time );
    2.19  
    2.20  	/* finalize everything */
     3.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfinfo/handler.c	Thu Mar 21 11:15:06 2013 +0000
     3.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfinfo/handler.c	Thu Mar 21 11:25:05 2013 +0000
     3.3 @@ -85,7 +85,7 @@
     3.4  {
     3.5    definitionInfoT *info = (definitionInfoT*)userData;
     3.6    uint32_t index = (info->counterDefinitionComment)++;
     3.7 -  (info->definitionComments) = (char**)realloc(info->definitionComments,(index + 1) * sizeof(char**));
     3.8 +  (info->definitionComments) = (char**)realloc(info->definitionComments,(index + 1) * sizeof(char*));
     3.9    (info->definitionComments)[index] = strdup(comment);
    3.10    return OTF_RETURN_OK;
    3.11  }
    3.12 @@ -141,7 +141,7 @@
    3.13    /*in a low info level, increment the marker counter*/
    3.14    if( MAXINFOLEVEL > ((definitionInfoT*)userData)->infoLevel )
    3.15    {
    3.16 -    ((definitionInfoT*)userData)->counterDefinitionMarker++;
    3.17 +    ((definitionInfoT*)userData)->counterMarkerDefinition++;
    3.18    }
    3.19    else
    3.20    {
    3.21 @@ -155,6 +155,27 @@
    3.22    return OTF_RETURN_OK;
    3.23  }
    3.24  
    3.25 +int handleDefCollectiveOperation( void *userData, uint32_t stream,
    3.26 +                                  uint32_t collOp, const char *name,
    3.27 +                                  uint32_t type )
    3.28 +{
    3.29 +  /*in a low info level, increment the collective counter*/
    3.30 +  if( 3 > ((definitionInfoT*)userData)->infoLevel )
    3.31 +  {
    3.32 +    ((definitionInfoT*)userData)->counterCollectiveOperationDefinition++;
    3.33 +  }
    3.34 +  else
    3.35 +  {
    3.36 +    /*in the max info level, get the collective operation names*/
    3.37 +    int index = 0;
    3.38 +    definitionInfoT *info = (definitionInfoT*)userData;
    3.39 +    while(info->collectiveOperationNames[index])
    3.40 +      index++;
    3.41 +    (info->collectiveOperationNames)[index] = strdup(name);
    3.42 +  }
    3.43 +  return OTF_RETURN_OK;
    3.44 +}
    3.45 +
    3.46  int handleDefProcessGroup( void *userData, uint32_t stream, uint32_t procGroup,
    3.47                             const char *name, uint32_t numberOfProcs, const uint32_t *procs )
    3.48  {
    3.49 @@ -221,7 +242,7 @@
    3.50    definitionInfoT *info = (definitionInfoT*)userData;
    3.51    uint32_t index = (info->counterSourceFileName)++;
    3.52    (info->sourceFileNames) = (char**)realloc( info->sourceFileNames,(index + 1)
    3.53 -                                             * sizeof(char**) );
    3.54 +                                             * sizeof(char*) );
    3.55    (info->sourceFileNames)[index] = strdup(name);
    3.56    return OTF_RETURN_OK;
    3.57  }
    3.58 @@ -288,22 +309,27 @@
    3.59    return OTF_RETURN_OK;
    3.60  }
    3.61  
    3.62 -int handleDefCollectiveOperation( void *userData, uint32_t stream,
    3.63 -                                  uint32_t collOp, const char *name,
    3.64 -                                  uint32_t type )
    3.65 +int handleMarker( void *userData, uint64_t time, uint32_t process,
    3.66 +                  uint32_t token, const char* text )
    3.67  {
    3.68 -  /*in a low info level, increment the collective counter*/
    3.69 +  ((definitionInfoT*)userData)->counterMarker++;
    3.70 +  return OTF_RETURN_OK;
    3.71 +}
    3.72 +
    3.73 +int handleCollectiveOperation( void *userData, uint64_t time,
    3.74 +                               uint32_t process, uint32_t collective,
    3.75 +                               uint32_t procGroup, uint32_t rootProc,
    3.76 +                               uint32_t sent, uint32_t received,
    3.77 +                               uint64_t duration, uint32_t source )
    3.78 +{
    3.79    ((definitionInfoT*)userData)->counterCollectiveOperation++;
    3.80 -  if( MAXINFOLEVEL <= ((definitionInfoT*)userData)->infoLevel )
    3.81 -  {
    3.82 -    /*in the max info level, get the collective operation names*/
    3.83 -    definitionInfoT *info = (definitionInfoT*)userData;
    3.84 -    int index = ((definitionInfoT*)userData)->counterCollectiveOperation;
    3.85 -    (info->collectiveOperationNames) = (char**)realloc(
    3.86 -                                         info->collectiveOperationNames,
    3.87 -                                         (index) * sizeof(char**) );
    3.88 -    (info->collectiveOperationNames)[index-1] = strdup(name);
    3.89 -  }
    3.90 +  return OTF_RETURN_OK;
    3.91 +}
    3.92 +
    3.93 +int handleEndCollectiveOperation( void *userData, uint64_t time,
    3.94 +                                  uint32_t process, uint64_t matchingId )
    3.95 +{
    3.96 +  ((definitionInfoT*)userData)->counterCollectiveOperation++;
    3.97    return OTF_RETURN_OK;
    3.98  }
    3.99  
     4.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfinfo/handler.h	Thu Mar 21 11:15:06 2013 +0000
     4.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfinfo/handler.h	Thu Mar 21 11:25:05 2013 +0000
     4.3 @@ -39,25 +39,27 @@
     4.4    uint8_t     otfVersionSub;
     4.5    uint64_t    traceFileSize;
     4.6    uint64_t    traceUniqueId;
     4.7 -  uint64_t    counterCollectiveOperation;
     4.8    uint64_t    counterDefinitionComment;
     4.9    uint64_t    counterSourceFileName;
    4.10    uint64_t    counterFunctionGroupDefinition;
    4.11    uint64_t    counterFunctionDefinition;
    4.12 +  uint64_t    counterCollectiveOperationDefinition;
    4.13    uint64_t    counterProcessGroupDefinition;
    4.14    uint64_t    counterProcessDefinition;
    4.15    uint64_t    counterCounterDefinition;
    4.16    uint64_t    counterCounterGroupDefinition;
    4.17 +  uint64_t    counterMarkerDefinition;
    4.18    uint64_t    counterLeave;
    4.19    uint64_t    counterEnter;
    4.20    uint64_t    counterSend;
    4.21    uint64_t    counterReceive;
    4.22 -  uint64_t    counterDefinitionMarker;
    4.23    uint64_t    timerResolution;
    4.24    uint64_t    counterRMAPut;
    4.25    uint64_t    counterRMAPutRemoteEnd;
    4.26    uint64_t    counterRMAGet;
    4.27    uint64_t    counterRMAEnd;
    4.28 +  uint64_t    counterMarker;
    4.29 +  uint64_t    counterCollectiveOperation;
    4.30    uint64_t    counterFileOperation;
    4.31    uint64_t    counterSnapshot;
    4.32  } definitionInfoT;
    4.33 @@ -95,6 +97,10 @@
    4.34  int handleDefMarker( void *userData, uint32_t stream, uint32_t token,
    4.35                       const char *name, uint32_t type );
    4.36  
    4.37 +int handleDefCollectiveOperation( void *userData, uint32_t stream,
    4.38 +                                  uint32_t collOp, const char *name,
    4.39 +                                  uint32_t type );
    4.40 +
    4.41  int handleDefProcessGroup( void *userData, uint32_t stream, uint32_t procGroup,
    4.42                             const char *name, uint32_t numberOfProcs,
    4.43                             const uint32_t *procs );
    4.44 @@ -141,9 +147,17 @@
    4.45                    uint32_t remote, uint32_t communicator, uint32_t tag,
    4.46                    uint32_t source );
    4.47  
    4.48 -int handleDefCollectiveOperation( void *userData, uint32_t stream,
    4.49 -                                  uint32_t collOp, const char *name,
    4.50 -                                  uint32_t type );
    4.51 +int handleMarker( void *userData, uint64_t time, uint32_t process,
    4.52 +                  uint32_t token, const char* text );
    4.53 +
    4.54 +int handleCollectiveOperation( void *userData, uint64_t time,
    4.55 +                               uint32_t process, uint32_t collective,
    4.56 +                               uint32_t procGroup, uint32_t rootProc,
    4.57 +                               uint32_t sent, uint32_t received,
    4.58 +                               uint64_t duration, uint32_t source );
    4.59 +
    4.60 +int handleEndCollectiveOperation( void *userData, uint64_t time,
    4.61 +                                  uint32_t process, uint64_t matchingId );
    4.62  
    4.63  int handleFileOperation( void *userData, uint64_t time, uint32_t fileid,
    4.64                           uint32_t process, uint64_t handleid,
     5.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfinfo/otfinfo.c	Thu Mar 21 11:15:06 2013 +0000
     5.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfinfo/otfinfo.c	Thu Mar 21 11:25:05 2013 +0000
     5.3 @@ -252,7 +252,7 @@
     5.4      checkVal = OTF_Reader_readDefinitions( reader, handles );
     5.5      otfinfo_assert( checkVal != OTF_READ_ERROR );
     5.6  
     5.7 -    if( info.counterDefinitionMarker != 0 )
     5.8 +    if( info.counterMarkerDefinition != 0 )
     5.9      {
    5.10        /*read markers*/
    5.11        checkVal = OTF_Reader_readMarkers( reader, handles );
    5.12 @@ -279,7 +279,8 @@
    5.13          OTF_Reader_eventBytesProgress( reader, &minRead, &currRead, &size );
    5.14          current = ( PROGRESSBARLEN * currRead ) / size;
    5.15          for( ; i < current; i++ )
    5.16 -          printf( "#" ); fflush( stdout );
    5.17 +          printf( "#" );
    5.18 +        fflush( stdout );
    5.19        }
    5.20        otfinfo_assert( checkVal != OTF_READ_ERROR )
    5.21        for( ; i < PROGRESSBARLEN; i++ )
    5.22 @@ -449,6 +450,13 @@
    5.23                                 OTF_DEFFUNCTION_RECORD );
    5.24    OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFFUNCTION_RECORD );
    5.25  
    5.26 +  /*handler and inits for getting the count of collop. definitions*/
    5.27 +  info->counterCollectiveOperationDefinition = 0;
    5.28 +  OTF_HandlerArray_setHandler( handles,
    5.29 +                               (OTF_FunctionPointer*)handleDefCollectiveOperation,
    5.30 +                               OTF_DEFCOLLOP_RECORD );
    5.31 +  OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCOLLOP_RECORD );
    5.32 +
    5.33    /*handler and inits for getting the count of counter definitions*/
    5.34    info->counterCounterDefinition = 0;
    5.35    OTF_HandlerArray_setHandler( handles,
    5.36 @@ -456,13 +464,6 @@
    5.37                                 OTF_DEFCOUNTER_RECORD);
    5.38    OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCOUNTER_RECORD );
    5.39  
    5.40 -  /*handler and inits for getting the count of marker definitions*/
    5.41 -  info->counterDefinitionMarker = 0;
    5.42 -  OTF_HandlerArray_setHandler( handles,
    5.43 -                               (OTF_FunctionPointer*)handleDefMarker,
    5.44 -                               OTF_DEFMARKER_RECORD );
    5.45 -  OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFMARKER_RECORD  );
    5.46 -
    5.47    /*handler and inits for getting the count of process group definitions*/
    5.48    info->counterProcessGroupDefinition = 0;
    5.49    OTF_HandlerArray_setHandler( handles,
    5.50 @@ -491,6 +492,13 @@
    5.51                                 (OTF_FunctionPointer*)handleDefSclFile,
    5.52                                 OTF_DEFSCLFILE_RECORD );
    5.53    OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFSCLFILE_RECORD );
    5.54 +
    5.55 +  /*handler and inits for getting the count of marker definitions*/
    5.56 +  info->counterMarkerDefinition = 0;
    5.57 +  OTF_HandlerArray_setHandler( handles,
    5.58 +                               (OTF_FunctionPointer*)handleDefMarker,
    5.59 +                               OTF_DEFMARKER_RECORD );
    5.60 +  OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFMARKER_RECORD  );
    5.61  }
    5.62  
    5.63  static void show_info_level_2( definitionInfoT *info )
    5.64 @@ -507,8 +515,8 @@
    5.65            (unsigned long long)info->counterFunctionDefinition );
    5.66    printf( "| counter definitions        | %llu\n",
    5.67            (unsigned long long)info->counterCounterDefinition );
    5.68 -  printf( "| marker definitions         | %llu\n",
    5.69 -          (unsigned long long)info->counterDefinitionMarker );
    5.70 +  printf( "| collective op. definitions | %llu\n",
    5.71 +          (unsigned long long)info->counterCollectiveOperationDefinition );
    5.72    printf( "|                            |\n" );
    5.73    printf( "| process group definitions  | %llu\n",
    5.74            (unsigned long long)info->counterProcessGroupDefinition );
    5.75 @@ -516,6 +524,9 @@
    5.76            (unsigned long long)info->counterFunctionGroupDefinition );
    5.77    printf( "| counter group definitions  | %llu\n",
    5.78            (unsigned long long)info->counterCounterGroupDefinition );
    5.79 +  printf( "|                            |\n" );
    5.80 +  printf( "| marker definitions         | %llu\n",
    5.81 +          (unsigned long long)info->counterMarkerDefinition );
    5.82    printf( "+----------------------------+--------------------------------------------------\n" );
    5.83  
    5.84    index = info->counterSourceFileName;
    5.85 @@ -609,9 +620,14 @@
    5.86    /*handler and inits for getting the count of collective operations*/
    5.87    info->counterCollectiveOperation = 0;
    5.88    OTF_HandlerArray_setHandler( handles,
    5.89 -                               (OTF_FunctionPointer*)handleDefCollectiveOperation,
    5.90 -                               OTF_DEFCOLLOP_RECORD );
    5.91 -  OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCOLLOP_RECORD  );
    5.92 +                               (OTF_FunctionPointer*)handleCollectiveOperation,
    5.93 +                               OTF_COLLOP_RECORD );
    5.94 +  OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_COLLOP_RECORD  );
    5.95 +
    5.96 +  OTF_HandlerArray_setHandler( handles,
    5.97 +                               (OTF_FunctionPointer*)handleEndCollectiveOperation,
    5.98 +                               OTF_ENDCOLLOP_RECORD );
    5.99 +  OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_ENDCOLLOP_RECORD  );
   5.100  
   5.101    /*handler and inits for getting the count of file operations*/
   5.102    info->counterFileOperation = 0;
   5.103 @@ -625,6 +641,13 @@
   5.104                                 OTF_ENDFILEOP_RECORD );
   5.105    OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_ENDFILEOP_RECORD  );
   5.106  
   5.107 +  /*handler and inits for getting the count of markers*/
   5.108 +  info->counterMarker = 0;
   5.109 +  OTF_HandlerArray_setHandler( handles,
   5.110 +                               (OTF_FunctionPointer*)handleMarker,
   5.111 +                               OTF_MARKER_RECORD );
   5.112 +  OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_MARKER_RECORD  );
   5.113 +
   5.114    /*handler and inits for getting the count of snapshots*/
   5.115    info->counterSnapshot = 0;
   5.116    OTF_HandlerArray_setHandler( handles,
   5.117 @@ -634,6 +657,7 @@
   5.118  
   5.119    (info->counters) = (counterT*)malloc( info->counterCounterDefinition *
   5.120                                          sizeof(counterT) );
   5.121 +
   5.122    for( i = 0; i < info->counterCounterDefinition; i++ )
   5.123    {
   5.124      (info->counters)[i].name = NULL;
   5.125 @@ -681,6 +705,8 @@
   5.126            (unsigned long long)info->counterCollectiveOperation );
   5.127    printf( "| file operations       | %llu\n",
   5.128            (unsigned long long)info->counterFileOperation );
   5.129 +  printf( "| markers               | %llu\n",
   5.130 +          (unsigned long long)info->counterMarker );
   5.131    printf( "| snapshots             | %llu\n",
   5.132            (unsigned long long)info->counterSnapshot );
   5.133    printf( "+-----------------------+-------------------------------------------------------\n" );
   5.134 @@ -748,14 +774,14 @@
   5.135                                 OTF_DEFFUNCTION_RECORD);
   5.136    OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFFUNCTION_RECORD );
   5.137  
   5.138 -  /*handler and inits for getting the names of markers*/
   5.139 -  info->markerNames = NULL;
   5.140 -  info->markerNames = (char**)calloc( info->counterDefinitionMarker,
   5.141 -                                      sizeof(char*) );
   5.142 +  /*handler and inits for getting the names of collective operations*/
   5.143 +  info->collectiveOperationNames = NULL;
   5.144 +  info->collectiveOperationNames = (char**)calloc( info->counterCollectiveOperationDefinition,
   5.145 +                                                   sizeof(char*) );
   5.146    OTF_HandlerArray_setHandler( handles,
   5.147 -                               (OTF_FunctionPointer*)handleDefMarker,
   5.148 -                               OTF_DEFMARKER_RECORD );
   5.149 -  OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFMARKER_RECORD  );
   5.150 +                               (OTF_FunctionPointer*)handleDefCollectiveOperation,
   5.151 +                               OTF_DEFCOLLOP_RECORD );
   5.152 +  OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCOLLOP_RECORD );
   5.153  
   5.154    /*handler and inits for getting the names of processe groups*/
   5.155    info->processGroupNames = NULL;
   5.156 @@ -766,8 +792,6 @@
   5.157                                 OTF_DEFPROCESSGROUP_RECORD);
   5.158    OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFPROCESSGROUP_RECORD );
   5.159  
   5.160 -  info->collectiveOperationNames = NULL;
   5.161 -
   5.162    /*handler and inits for getting the names of function groups*/
   5.163    info->functionGroupNames = NULL;
   5.164    info->functionGroupNames = (char**)calloc( info->counterFunctionGroupDefinition,
   5.165 @@ -777,7 +801,7 @@
   5.166                                 OTF_DEFFUNCTIONGROUP_RECORD);
   5.167    OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFFUNCTIONGROUP_RECORD );
   5.168  
   5.169 -  /*handler and inits for getting the names of counter groupss*/
   5.170 +  /*handler and inits for getting the names of counter groups*/
   5.171    info->counterGroupNames = NULL;
   5.172    info->counterGroupNames = (char**)calloc( info->counterCounterGroupDefinition,
   5.173                                              sizeof(char*) );
   5.174 @@ -785,6 +809,15 @@
   5.175                                 (OTF_FunctionPointer*)handleDefCounterGroup,
   5.176                                 OTF_DEFCOUNTERGROUP_RECORD);
   5.177    OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFCOUNTERGROUP_RECORD );
   5.178 +
   5.179 +  /*handler and inits for getting the names of markers*/
   5.180 +  info->markerNames = NULL;
   5.181 +  info->markerNames = (char**)calloc( info->counterMarkerDefinition,
   5.182 +                                      sizeof(char*) );
   5.183 +  OTF_HandlerArray_setHandler( handles,
   5.184 +                               (OTF_FunctionPointer*)handleDefMarker,
   5.185 +                               OTF_DEFMARKER_RECORD );
   5.186 +  OTF_HandlerArray_setFirstHandlerArg( handles, info, OTF_DEFMARKER_RECORD  );
   5.187  }
   5.188  
   5.189  static void show_info_level_4( definitionInfoT *info )
   5.190 @@ -816,9 +849,9 @@
   5.191    printf( "\n" );
   5.192    printf( "+-------------------------------------------------------------------------------\n" );
   5.193    printf( "| marker definitions[%llu]\n",
   5.194 -          (unsigned long long)info->counterDefinitionMarker );
   5.195 +          (unsigned long long)info->counterMarkerDefinition );
   5.196    printf( "+-------------------------------------------------------------------------------\n" );
   5.197 -  for( i = 0; i < info->counterDefinitionMarker; i++ )
   5.198 +  for( i = 0; i < info->counterMarkerDefinition; i++ )
   5.199    {
   5.200       printf( "| %s\n", info->markerNames[i] );
   5.201    }
   5.202 @@ -826,9 +859,9 @@
   5.203    printf( "\n" );
   5.204    printf( "+-------------------------------------------------------------------------------\n" );
   5.205    printf( "| collective operation definitions[%llu]\n",
   5.206 -          (unsigned long long)info->counterCollectiveOperation );
   5.207 +          (unsigned long long)info->counterCollectiveOperationDefinition );
   5.208    printf( "+-------------------------------------------------------------------------------\n" );
   5.209 -  for( i = 0; i < info->counterCollectiveOperation; i++ )
   5.210 +  for( i = 0; i < info->counterCollectiveOperationDefinition; i++ )
   5.211    {
   5.212      printf( "| %s\n", info->collectiveOperationNames[i] );
   5.213    }
   5.214 @@ -905,7 +938,7 @@
   5.215      free( info->functionGroupNames );
   5.216    }
   5.217  
   5.218 -  for(i = 0; i < info->counterCollectiveOperation; i++ )
   5.219 +  for(i = 0; i < info->counterCollectiveOperationDefinition; i++ )
   5.220    {
   5.221      free( (info->collectiveOperationNames)[i] );
   5.222    }
   5.223 @@ -917,7 +950,7 @@
   5.224    }
   5.225    free( info->counterGroupNames );
   5.226  
   5.227 -  for( i = 0; i < info->counterDefinitionMarker; i++ )
   5.228 +  for( i = 0; i < info->counterMarkerDefinition; i++ )
   5.229    {
   5.230      free( (info->markerNames)[i] );
   5.231    }
     6.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/comparison_kmeans.cpp	Thu Mar 21 11:15:06 2013 +0000
     6.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/comparison_kmeans.cpp	Thu Mar 21 11:25:05 2013 +0000
     6.3 @@ -382,7 +382,8 @@
     6.4                  cnt++;
     6.5              }
     6.6          }
     6.7 -        ret_quality->avg_dist2_vec_to_cent= ret_quality->avg_dist2_vec_to_cent / cnt;
     6.8 +        if ( 0 < cnt )
     6.9 +            ret_quality->avg_dist2_vec_to_cent= ret_quality->avg_dist2_vec_to_cent / cnt;
    6.10  
    6.11          ret_quality->min_dist2_cent_to_cent= numeric_limits<double>::max( );
    6.12          ret_quality->max_dist2_cent_to_cent= numeric_limits<double>::min( );
    6.13 @@ -402,7 +403,8 @@
    6.14                  cnt++;
    6.15              }
    6.16          }
    6.17 -        ret_quality->avg_dist2_cent_to_cent= ret_quality->avg_dist2_cent_to_cent / cnt;
    6.18 +        if ( 0 < cnt )
    6.19 +            ret_quality->avg_dist2_cent_to_cent= ret_quality->avg_dist2_cent_to_cent / cnt;
    6.20  
    6.21          ret_quality->iterations_used= m;
    6.22          ret_quality->iterations_max= max;
     7.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/create_csv.cpp	Thu Mar 21 11:15:06 2013 +0000
     7.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/create_csv.cpp	Thu Mar 21 11:25:05 2013 +0000
     7.3 @@ -404,9 +404,6 @@
     7.4                              write_collop_data( alldata, csv_file,
     7.5                                  csv_file_name );
     7.6                              break;
     7.7 -                        default:
     7.8 -                            assert( 0 );
     7.9 -                            break;
    7.10  
    7.11                      }
    7.12  
     8.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/create_filter.h	Thu Mar 21 11:15:06 2013 +0000
     8.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/create_filter.h	Thu Mar 21 11:25:05 2013 +0000
     8.3 @@ -71,6 +71,7 @@
     8.4      std::vector<CTree<std::string>*> children;
     8.5      double timeFilt;
     8.6      CTree() {
     8.7 +        parent = NULL;
     8.8          timeFilt = 0;
     8.9          rule = 1;
    8.10          n = 0;
     9.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/create_latex.cpp	Thu Mar 21 11:15:06 2013 +0000
     9.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/create_latex.cpp	Thu Mar 21 11:25:05 2013 +0000
     9.3 @@ -934,6 +934,9 @@
     9.4      tex << "\\verb|" << func_name << "|";
     9.5  
     9.6      if((factor <= 0) | (lowq < 0) | (median < 0) | (topq < 0)){
     9.7 +      const std::ios_base::fmtflags cout_flags_sav = std::cout.flags();
     9.8 +      const std::streamsize cout_prec_sav = std::cout.precision();
     9.9 +
    9.10        cout.setf(ios::scientific, ios::floatfield);
    9.11        cout.precision(5);
    9.12  
    9.13 @@ -944,6 +947,9 @@
    9.14            << "top quartile: " << it->second.excl_time_top_quartile << ", "
    9.15            << "maximum: " << it->second.excl_time_maximum << endl;
    9.16  
    9.17 +      cout.setf(cout_flags_sav);
    9.18 +      cout.precision(cout_prec_sav);
    9.19 +
    9.20        count++;
    9.21        it++;
    9.22      }
    9.23 @@ -1016,10 +1022,6 @@
    9.24    }
    9.25  
    9.26    tex << "\\end{flushleft}" << endl << endl;
    9.27 -
    9.28 -  tex.setf(ios::floatfield);
    9.29 -  tex.precision(7);
    9.30 -
    9.31    tex << "\\newpage" << endl << endl;
    9.32  }
    9.33  
    9.34 @@ -1269,6 +1271,9 @@
    9.35          pageSize += 1;
    9.36          tex << "\\verb|" << func_name << "|";
    9.37          if ((factor <= 0) | (lowq < 0) | (median < 0) | (topq < 0)) {
    9.38 +            const std::ios_base::fmtflags cout_flags_sav = std::cout.flags();
    9.39 +            const std::streamsize cout_prec_sav = std::cout.precision();
    9.40 +
    9.41              cout.setf(ios::scientific, ios::floatfield);
    9.42              cout.precision(5);
    9.43  
    9.44 @@ -1280,6 +1285,9 @@
    9.45                      << it->second.excl_time_95_percent << ", " << "maximum: "
    9.46                      << it->second.excl_time_maximum << endl;
    9.47  
    9.48 +            cout.setf(cout_flags_sav);
    9.49 +            cout.precision(cout_prec_sav);
    9.50 +
    9.51              count++;
    9.52              it++;
    9.53          }
    9.54 @@ -1716,6 +1724,12 @@
    9.55      const unsigned int BP_WIDTH = 15;
    9.56      const unsigned int BP_HEIGHT = 7;
    9.57  
    9.58 +    const std::ios_base::fmtflags tex_flags_sav = tex.flags();
    9.59 +    const std::streamsize tex_prec_sav = tex.precision();
    9.60 +
    9.61 +    tex.setf(ios::floatfield);
    9.62 +    tex.precision(7);
    9.63 +
    9.64      tex << "\\begin{center}" << endl;
    9.65      tex << "{\\Large \\bf Top 20 Dispersion of Functions}";
    9.66      tex << endl << "\\bigskip" << endl;
    9.67 @@ -1819,6 +1833,9 @@
    9.68          it++;
    9.69          count++;
    9.70      }
    9.71 +
    9.72 +    tex.setf(tex_flags_sav);
    9.73 +    tex.precision(tex_prec_sav);
    9.74  }
    9.75  
    9.76  /*
    10.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/datastructs.h	Thu Mar 21 11:15:06 2013 +0000
    10.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/datastructs.h	Thu Mar 21 11:25:05 2013 +0000
    10.3 @@ -165,6 +165,9 @@
    10.4      uint64_t*    rank_cur_bytes; /* current bytes read per rank (except rank 0) */
    10.5      uint32_t     ranks_left;     /* root keeps track of ranks left to query */
    10.6  #endif /* OTFPROFILE_MPI */
    10.7 +
    10.8 +    Progress()
    10.9 +        : cur_bytes(0), max_bytes(0) {}
   10.10  };
   10.11  
   10.12  
   10.13 @@ -1073,7 +1076,8 @@
   10.14      uint64_t dispersionMarkerBorder;
   10.15      AllData( uint32_t my_rank= 0, uint32_t num_ranks= 1 ) :
   10.16          myRank(my_rank), numRanks(num_ranks), myProcessesNum(0),
   10.17 -        myProcessesList(NULL), timerResolution(0), recvTimeKey(0) {
   10.18 +        myProcessesList(NULL), timerResolution(0), recvTimeKey(0),
   10.19 +        maxCallpathLength(0), dispersionMarkerBorder(0) {
   10.20  
   10.21  #ifdef OTFPROFILE_MPI
   10.22          packBufferSize= 0;
    11.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/otfprofile.cpp	Thu Mar 21 11:15:06 2013 +0000
    11.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/otfprofile.cpp	Thu Mar 21 11:25:05 2013 +0000
    11.3 @@ -342,8 +342,7 @@
    11.4  
    11.5              }
    11.6  
    11.7 -            ret = 1;
    11.8 -            break;
    11.9 +            return 1;
   11.10  
   11.11              /* -V */
   11.12          } else if (0 == strcmp("-V", argv[i])) {
   11.13 @@ -355,8 +354,7 @@
   11.14  
   11.15              }
   11.16  
   11.17 -            ret = 1;
   11.18 -            break;
   11.19 +            return 1;
   11.20  
   11.21              /* -v */
   11.22          } else if (0 == strcmp("-v", argv[i])) {
   11.23 @@ -631,6 +629,8 @@
   11.24  
   11.25                  } while ((tok = strtok( NULL, ",")));
   11.26  
   11.27 +		free( arg );
   11.28 +
   11.29                  if (ERR_ARG_INVALID == parse_error)
   11.30                      break;
   11.31  
   11.32 @@ -766,10 +766,6 @@
   11.33                          << "'." << endl;
   11.34                  break;
   11.35  
   11.36 -            default:
   11.37 -
   11.38 -                break;
   11.39 -
   11.40              }
   11.41  
   11.42          }
    12.1 --- a/ompi/contrib/vt/vt/extlib/otf/tools/otfshrink/otfshrink.cpp	Thu Mar 21 11:15:06 2013 +0000
    12.2 +++ b/ompi/contrib/vt/vt/extlib/otf/tools/otfshrink/otfshrink.cpp	Thu Mar 21 11:25:05 2013 +0000
    12.3 @@ -164,11 +164,11 @@
    12.4      return 0;
    12.5  }
    12.6  int parse_token(char* token,set<uint32_t>& tMap) {
    12.7 +    if (!token) return 0;
    12.8      if( false == checkString(token) ) {
    12.9        cout << "Error: '" << token << "' includes (a) letter(s)" << endl;
   12.10        return 1;
   12.11      }
   12.12 -    if (!token) return 0;
   12.13      const char* delim="-";
   12.14      char* tok;
   12.15      uint32_t start=0;