Teuchos - Trilinos Tools Package Version of the Day
Static Public Member Functions
Teuchos::PerformanceMonitorUtils Class Reference

Provides common capabilities for collecting and reporting performance data across processors. More...

#include <Teuchos_PerformanceMonitorUtils.hpp>

List of all members.

Static Public Member Functions

static void synchNames (const MPIComm &comm, const Array< std::string > &localNames, Array< std::string > &allNames)
 Synchronizes lists of metric names (e.g., timer names) across processors. This is necessary because some functions may not have been invoked on some processors, so that their named timers/counters aren't created on that processor. This function does a set union of all names created on all processors. It is called by synchValues().
static void synchValues (const MPIComm &comm, const Array< std::string > &localNames, const Array< Array< double > > &localValues, Array< std::string > &allNames, Array< Array< double > > &allValues)
 Creates zero values for metrics absent on this processor but present on other processors. This function uses a call to synchNames() to inform this processor of the existence of other metrics on other processors.
static void reduce (const MPIComm &comm, const EMetricReduction &reductionType, const Array< double > &localVals, Array< double > &reducedVals)
 Compute reduced performance metrics across processors, for example, min, max, or total times or flop counts.

Detailed Description

Provides common capabilities for collecting and reporting performance data across processors.

Definition at line 56 of file Teuchos_PerformanceMonitorUtils.hpp.


Member Function Documentation

void PerformanceMonitorUtils::synchNames ( const MPIComm comm,
const Array< std::string > &  localNames,
Array< std::string > &  allNames 
) [static]

Synchronizes lists of metric names (e.g., timer names) across processors. This is necessary because some functions may not have been invoked on some processors, so that their named timers/counters aren't created on that processor. This function does a set union of all names created on all processors. It is called by synchValues().

Parameters:
comm[in] the communicator over which name lists are being synchronized
localNames[in] the names appearing on the local processor
allNames[out] the set union of name lists from all processors

Definition at line 35 of file Teuchos_PerformanceMonitorUtils.cpp.

void PerformanceMonitorUtils::synchValues ( const MPIComm comm,
const Array< std::string > &  localNames,
const Array< Array< double > > &  localValues,
Array< std::string > &  allNames,
Array< Array< double > > &  allValues 
) [static]

Creates zero values for metrics absent on this processor but present on other processors. This function uses a call to synchNames() to inform this processor of the existence of other metrics on other processors.

Parameters:
comm[in] the communicator over which name lists are being synchronized
localNames[in] the names appearing on the local processor
localValues[in] the values appearing on the local processor
allNames[out] the set union of name lists from all processors
allValues[out] the metric values from all processors

Definition at line 76 of file Teuchos_PerformanceMonitorUtils.cpp.

void PerformanceMonitorUtils::reduce ( const MPIComm comm,
const EMetricReduction reductionType,
const Array< double > &  localVals,
Array< double > &  reducedVals 
) [static]

Compute reduced performance metrics across processors, for example, min, max, or total times or flop counts.

Parameters:
comm[in] The MPIComm object representing the communicator on which the reduction is to be done.
reductionType[in] the reduction operation to be performed
localVals[in] The metrics on this processor (after synchronization through a call to synchValues())
reducedVals[out] The reduced metrics

Definition at line 124 of file Teuchos_PerformanceMonitorUtils.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines