Public Types | Public Member Functions | Data Fields | Protected Attributes | Friends

SST::Introspector Class Reference

Main introspector object for the simulation. More...

#include <introspector.h>

Inheritance diagram for SST::Introspector:
Introspector_cpu Introspector_cpuTemperature Introspector_dram Introspector_router

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...
typedef std::multimap< int,
IntrospectedComponent * > 
Database_t

Public Member Functions

 Introspector ()
 Constructor.
virtual int Setup ()
 Called after all components/introspectors have been constructed, but before simulation time has begun.
virtual int Finish ()
 Called after simulation completes, but before objects are destroyed.
std::list
< IntrospectedComponent * > 
getModels (const std::string CompType)
 Get component of a certain type indicated by CompType on this rank.
void monitorComponent (IntrospectedComponent *c)
 Declare that this introspector will be monitoring a given component.
void addToIntDatabase (IntrospectedComponent *c, int dataID)
 Store pointer to the component and the data ID of the integer data of interest in a local map.
void addToDoubleDatabase (IntrospectedComponent *c, int dataID)
 Store pointer to the component and the data ID of the double data of interest in a local map.
virtual bool pullData (Cycle_t)
 Query the components it is moniroting at regular intervals to retrieve components' statistics & data.
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.
Database_t DatabaseInt
 Database of the integer data monitored by this introspector available through Introspector::pullData().
Database_t DatabaseDouble
 Database of the double data monitored by this introspector available through Introspector::pullData().
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().
std::vector< 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

Member Function Documentation

void SST::Introspector::addToDoubleDatabase ( IntrospectedComponent c,
int  dataID 
)

Store pointer to the component and the data ID of the double data of interest in a local map.

This function is usually used in Introspector::Setup().

Parameters:
c Pointer to the component that is monitored by this introspector
dataID ID of the double data

References DatabaseDouble.

void SST::Introspector::addToIntDatabase ( IntrospectedComponent c,
int  dataID 
)

Store pointer to the component and the data ID of the integer data of interest in a local map.

This function is usually used in Introspector::Setup().

Parameters:
c Pointer to the component that is monitored by this introspector
dataID ID of the integer data

References DatabaseInt.

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 int SST::Introspector::Finish (  )  [inline, virtual]

Called after simulation completes, but before objects are destroyed.

A good place to print out statistics.

Reimplemented in Introspector_cpu, Introspector_cpuTemperature, Introspector_dram, and Introspector_router.

std::list< IntrospectedComponent * > SST::Introspector::getModels ( 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 MyCompList.

void SST::Introspector::monitorComponent ( IntrospectedComponent c  ) 

Declare that this introspector will be monitoring a given component.

The information of the introspector is also stored in the component's MyIntroList. This function is usually used in Introspector::Setup().

Parameters:
c Pointer to the component that will be monitored

References SST::IntrospectedComponent::addToIntroList().

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
virtual bool SST::Introspector::pullData ( Cycle_t   )  [inline, virtual]

Query the components it is moniroting at regular intervals to retrieve components' statistics & data.

Introspector-writers will implement their own pullData function. This function calls Component::getIntData() or Component::getDoubleData() to retrieve components' data, and is a good place to manipulate the data (print to screen, MPI collective communication, etc). This function can be invoked by an event handler triggered by a clock.

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.

virtual int SST::Introspector::Setup (  )  [inline, virtual]

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

Reimplemented in Introspector_cpu, Introspector_cpuTemperature, Introspector_dram, and Introspector_router.


Field Documentation

std::vector<uint64_t> SST::Introspector::arrayvalue

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

Referenced by collectInt().

Database of the double data monitored by this introspector available through Introspector::pullData().

Referenced by addToDoubleDatabase().

Database of the integer data monitored by this introspector available through Introspector::pullData().

Referenced by addToIntDatabase().

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 getModels().

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

Referenced by collectInt().


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