12 #ifndef SST_CORE_INTROSPECTOR_H
13 #define SST_CORE_INTROSPECTOR_H
15 #include "sst/core/clock.h"
16 #include "sst/core/introspectedComponent.h"
23 #define _INTROSPECTOR_DBG( fmt, args...) \
24 printf( "%d:Introspector::%s():%d: " fmt, _debug_rank, __FUNCTION__,__LINE__, ## args )
26 #define _INTROSPECTOR_DBG( fmt, args...)
40 enum collect_type { GATHER, ALLGATHER, BROADCAST, REDUCE, ALLREDUCE};
65 std::list<IntrospectedComponent*>
getModelsByName(
const std::string CompName);
70 std::list<IntrospectedComponent*>
getModelsByType(
const std::string CompType);
77 template <
typename typeT>
141 template <
typename typeT>
145 std::pair<bool, IntrospectedComponent::MonitorBase*> p;
152 return any_cast<typeT>( (*monitor)());
160 #endif // SST_CORE_INTROSPECTOR_H
uint64_t minvalue
Minimum value of the integer values collected from all introspectors by Introspector::collectInt().
Definition: introspector.h:111
TimeConverter * defaultTimeBase
Timebase used if no other timebase is specified for calls like Component::getCurrentSimTime().
Definition: introspector.h:136
SimTime_t getFactor()
Return the factor used for conversions with Core Time.
Definition: timeConverter.h:50
std::pair< bool, IntrospectedComponent::MonitorBase * > getMonitor(std::string dataname)
Find monitor indicated by "dataname" from the map.
Definition: introspectedComponent.cc:142
mpi_operation
Types of funciton objects for the reduce collective.
Definition: introspector.h:42
A class to convert between a component's view of time and the core's view of time.
Definition: timeConverter.h:25
virtual void setup()
Called after all components/introspectors have been constructed, but before simulation time has begun...
Definition: introspector.h:56
void oneTimeCollect(SimTime_t time, Event::HandlerBase *functor)
One time introspectors collective communication.
Definition: introspector.cc:191
virtual bool triggeredUpdate()
Introspector-writers will implement their own triggeredUpdate function.
Definition: introspector.h:83
uint64_t maxvalue
Maximum value of the integer values collected from all introspectors by Introspector::collectInt().
Definition: introspector.h:113
typeT getData(IntrospectedComponent *c, std::string dataname)
Query the components indicated by "c" to retrieve components' statistics & data.
Definition: introspector.h:142
Definition: introspectedComponent.h:152
uint64_t value
Result value of the reduction operation in Introspector::collectInt().
Definition: introspector.h:115
Main component object for the simulation.
Definition: introspectedComponent.h:122
uint64_t * arrayvalue
Data vector that holds data collected from all introspectors by Introspector::collectInt().
Definition: introspector.h:118
Main introspector object for the simulation.
Definition: introspector.h:36
Functor classes for Clock handling.
Definition: clock.h:44
std::list< IntrospectedComponent * > MyCompList
List of components that this introspector is monitoring.
Definition: introspector.h:109
std::list< IntrospectedComponent * > getModelsByName(const std::string CompName)
Get component of a certain type indicated by CompName on this rank.
Definition: introspector.cc:46
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...
Definition: introspector.cc:75
std::list< IntrospectedComponent * > getModelsByType(const std::string CompType)
Get component of a certain type indicated by CompType on this rank.
Definition: introspector.cc:58
TimeConverter * registerClock(std::string freq, Clock::HandlerBase *handler)
Registers a clock for this component.
Definition: introspector.cc:39
Functor classes for Event handling.
Definition: event.h:86
virtual void finish()
Called after simulation completes, but before objects are destroyed.
Definition: introspector.h:59
Introspector()
Constructor.
Definition: introspector.cc:29
collect_type
Types of boost MPI collective operations that introspector can perform.
Definition: introspector.h:40