SST::Introspector Class Reference

Main introspector object for the simulation. More...

#include <introspector.h>

Public Types

enum  collect_type {
  GATHER, ALLGATHER, BROADCAST, REDUCE,
  ALLREDUCE
}
 

Types of boost MPI collective operations that introspector can perform.

More...
enum  mpi_operation { MINIMUM, MAXIMUM, SUM, NOT_APPLICABLE }
 

Types of funciton objects for the reduce collective.

More...

Public Member Functions

 Introspector ()
 Constructor.
virtual void setup ()
 Called after all components/introspectors have been constructed, but before simulation time has begun.
virtual void finish ()
 Called after simulation completes, but before objects are destroyed.
std::list
< IntrospectedComponent * > 
getModelsByName (const std::string CompName)
 Get component of a certain type indicated by CompName on this rank.
std::list
< IntrospectedComponent * > 
getModelsByType (const std::string CompType)
 Get component of a certain type indicated by CompType on this rank.
template<typename typeT >
typeT getData (IntrospectedComponent *c, std::string dataname)
 Query the components indicated by "c" to retrieve components' statistics & data.
virtual bool triggeredUpdate ()
 Introspector-writers will implement their own triggeredUpdate function.
void collectInt (collect_type ctype, uint64_t invalue, mpi_operation op=NOT_APPLICABLE, int rank=0)
 Introspectors communicate among themselves with Boost MPI to exchange their integer data, invalue.
void oneTimeCollect (SimTime_t time, Event::HandlerBase *functor)
 One time introspectors collective communication.
TimeConverterregisterClock (std::string freq, Clock::HandlerBase *handler)
 Registers a clock for this component.
void unregisterClock (TimeConverter *tc, Clock::HandlerBase *handler)
SimTime_t getFreq ()

Data Fields

std::list
< IntrospectedComponent * > 
MyCompList
 List of components that this introspector is monitoring.
uint64_t minvalue
 Minimum value of the integer values collected from all introspectors by Introspector::collectInt().
uint64_t maxvalue
 Maximum value of the integer values collected from all introspectors by Introspector::collectInt().
uint64_t value
 Result value of the reduction operation in Introspector::collectInt().
uint64_t * arrayvalue
 Data vector that holds data collected from all introspectors by Introspector::collectInt().

Protected Attributes

TimeConverterdefaultTimeBase
 Timebase used if no other timebase is specified for calls like Component::getCurrentSimTime().

Friends

class boost::serialization::access

Detailed Description

Main introspector object for the simulation.

All models inherit from this. Introspection interface is a unified way to gather statistics and arbitrary data from components.


Member Enumeration Documentation

Types of boost MPI collective operations that introspector can perform.

Types of funciton objects for the reduce collective.


Constructor & Destructor Documentation

SST::Introspector::Introspector (  ) 

Constructor.

Generally only called by the factory class.

Parameters:
id Unique introspector ID

References arrayvalue.


Member Function Documentation

void SST::Introspector::collectInt ( collect_type  ctype,
uint64_t  invalue,
mpi_operation  op = NOT_APPLICABLE,
int  rank = 0 
)

Introspectors communicate among themselves with Boost MPI to exchange their integer data, invalue.

This function initiates a specific type of collective communicaiton indicated by ctype. The data are operated based on ctype and on the MPI operation, op. An introspector type can have periodic collective communication by calling this function in a member function registered with an event handler that is triggered by a clock.

Parameters:
ctype Types of collective communication. Currently supported options are Broadcast, (all)gather, and (all)reduce
invalue The local value to be communicated
op Types of the MPI operations for the (all)reduce algorithm to combine the values. Currently supported options are summarize, minimum and maximum. Default is set to none
rank The rank where the introspector resides. Default is set to 0. If ctype is broadcast, rank here indicates the rank that will transmitting the value

References arrayvalue, maxvalue, minvalue, and value.

virtual void SST::Introspector::finish (  )  [inline, virtual]

Called after simulation completes, but before objects are destroyed.

A good place to print out statistics.

template<typename typeT >
typeT SST::Introspector::getData ( IntrospectedComponent c,
std::string  dataname 
) [inline]

Query the components indicated by "c" to retrieve components' statistics & data.

Return the value of the data indicated by "dataname". The function is usually called by introspector-pull mechanism in Introspector::triggeredUpdate().

Parameters:
c Pointer to the component
dataname Name of the data

References SST::IntrospectedComponent::getMonitor().

std::list< IntrospectedComponent * > SST::Introspector::getModelsByName ( const std::string  CompName  ) 

Get component of a certain type indicated by CompName on this rank.

Name is unique so the fuction actually returns a list with only one component. This function is usually used in Introspector::setup().

Parameters:
CompName Component's name

References SST::Simulation::getComponent(), SST::Simulation::getSimulation(), and MyCompList.

std::list< IntrospectedComponent * > SST::Introspector::getModelsByType ( const std::string  CompType  ) 

Get component of a certain type indicated by CompType on this rank.

If CompType is blank, a list of all local components is returned. This function is usually used in Introspector::setup().

Parameters:
CompType Component's type

References SST::Simulation::getComponentInfoMap(), SST::Simulation::getSimulation(), and MyCompList.

void SST::Introspector::oneTimeCollect ( SimTime_t  time,
Event::HandlerBase functor 
)

One time introspectors collective communication.

The event handling functors that calls a given member communication function is inserted into the queue and will be triggered at time specified by, time. The introspector-write implements their own communication function if they want something other than the basic collective operations, broadcast, (all)reduce and (all)gather.

Parameters:
time The simulation time when the introspectors will communicate among themselves
functor Event handling functor that invokes member communication function

References SST::Simulation::getSimulation(), and SST::Simulation::insertActivity().

TimeConverter * SST::Introspector::registerClock ( std::string  freq,
Clock::HandlerBase handler 
)

Registers a clock for this component.

Parameters:
freq Frequency for the clock in SI units
handler Pointer to Clock::HandlerBase which is to be invoked at the specified interval
regAll Should this clock perioud be used as the default time base for all of the links connected to this component

References defaultTimeBase, SST::Simulation::getSimulation(), and SST::Simulation::registerClock().

virtual void SST::Introspector::setup (  )  [inline, virtual]

Called after all components/introspectors have been constructed, but before simulation time has begun.

virtual bool SST::Introspector::triggeredUpdate (  )  [inline, virtual]

Introspector-writers will implement their own triggeredUpdate function.

This function calls Introspector::getData() to retrieve components' data, and is a good place to manipulate the data (print to screen, MPI collective communication, etc).

Referenced by SST::IntrospectedComponent::triggerUpdate().


Field Documentation

Data vector that holds data collected from all introspectors by Introspector::collectInt().

Referenced by collectInt(), and Introspector().

Timebase used if no other timebase is specified for calls like Component::getCurrentSimTime().

Often set by Component::registerClock() function

Referenced by registerClock().

Maximum value of the integer values collected from all introspectors by Introspector::collectInt().

Referenced by collectInt().

Minimum value of the integer values collected from all introspectors by Introspector::collectInt().

Referenced by collectInt().

List of components that this introspector is monitoring.

Referenced by getModelsByName(), and getModelsByType().

Result value of the reduction operation in Introspector::collectInt().

Referenced by collectInt().


The documentation for this class was generated from the following files:

Generated on 14 Sep 2015 for SST by  doxygen 1.6.1