12#ifndef SST_CORE_BASECOMPONENT_H
13#define SST_CORE_BASECOMPONENT_H
15#include "sst/core/clock.h"
16#include "sst/core/componentInfo.h"
17#include "sst/core/eli/elementinfo.h"
18#include "sst/core/event.h"
19#include "sst/core/factory.h"
20#include "sst/core/portModule.h"
21#include "sst/core/profile/componentProfileTool.h"
22#include "sst/core/serialization/serializable_base.h"
23#include "sst/core/serialization/serialize.h"
24#include "sst/core/sst_types.h"
25#include "sst/core/statapi/statbase.h"
26#include "sst/core/statapi/statengine.h"
27#include "sst/core/timeConverter.h"
28#include "sst/core/warnmacros.h"
40using namespace SST::Statistics;
59namespace Core::Serialization::pvt {
69 friend class Component;
70 friend class ComponentExtension;
71 friend class ComponentInfo;
72 friend class SubComponent;
73 friend class SubComponentSlotInfo;
74 friend class PortModule;
80 BaseComponent() =
default;
83 explicit BaseComponent(ComponentId_t
id);
84 virtual ~BaseComponent();
86 BaseComponent(
const BaseComponent&) =
delete;
87 BaseComponent& operator=(
const BaseComponent&) =
delete;
94 const std::string&
getType()
const {
return my_info_->getType(); }
101 inline ComponentId_t
getId()
const {
return my_info_->id_; }
120 inline const std::string&
getName()
const {
return my_info_->getName(); }
136 virtual void init(
unsigned int UNUSED(phase)) {}
144 virtual void complete(
unsigned int UNUSED(phase)) {}
340 void removeWatchPointRecursive(
WatchPoint* pt);
410 return configureLink_impl(name, timebase.
getFactor(), handler);
519 TimeConverter getTimeConverter(
const std::string& base)
const;
522 bool isStatisticShared(
const std::string& stat_name,
bool include_me =
false)
525 if ( getStatisticValidityAndLevel(stat_name) != 255 ) {
529 if ( my_info_->sharesStatistics() ) {
530 return my_info_->parent_info->component->isStatisticShared(stat_name,
true);
545 ImplementSerializable(SST::BaseComponent)
546 void serialize_order(SST::Core::Serialization::serializer& ser)
override;
570 Link* configureLink_impl(
const std::string& name, SimTime_t timebase,
Event::HandlerBase* handler =
nullptr);
584 template <
typename T>
585 Statistics::Statistic<T>* createStatistic(
586 SST::Params& params, StatisticId_t
id,
const std::string& name,
const std::string& stat_sub_id)
596 StatCreateFunction create = [=](BaseComponent* comp, Statistics::StatisticProcessingEngine* engine,
597 const std::string& name,
const std::string& sub_id,
598 SST::Params& params) -> Statistics::StatisticBase* {
599 return engine->createStatistic<T>(comp, name, sub_id, params);
606 Statistics::StatisticBase* base_stat =
607 id == STATALL_ID ? createEnabledAllStatistic(params, name, stat_sub_id, std::move(create))
608 : getParentComponent()->createExplicitlyEnabledStatistic(
609 params, id, name, stat_sub_id, std::move(create));
612 auto* statistic =
dynamic_cast<Statistics::Statistic<T>*
>(base_stat);
617 fatal(__LINE__, __FILE__,
"createStatistic", 1,
"failed to cast created statistic '%s' to expected type",
628 template <
typename T>
629 Statistics::Statistic<T>* registerStatistic_impl(
630 SST::Params& params,
const std::string& stat_name,
const std::string& stat_sub_id, uint8_t level = 255)
632 if ( level == 255 ) {
633 level = getStatisticValidityAndLevel(stat_name);
636 if ( level == 255 ) {
638 if ( my_info_->parent_info && my_info_->sharesStatistics() ) {
639 return my_info_->parent_info->component->registerStatistic_impl<T>(params, stat_name, stat_sub_id);
643 fatal(__LINE__, __FILE__,
"registerStatistic", 1,
644 "attempting to register a statistic '%s' that is not found in ELI", stat_name.c_str());
649 if ( my_info_->enabled_stat_names_ ) {
650 auto iter = my_info_->enabled_stat_names_->find(stat_name);
651 if ( iter != my_info_->enabled_stat_names_->end() ) {
655 StatisticId_t
id = iter->second;
656 return getParentComponent()->createStatistic<T>(params, id, stat_name, stat_sub_id);
661 if ( my_info_->enabled_all_stats_ ) {
663 return getStatEngine()->createDisabledStatistic<T>();
665 return createStatistic<T>(params, STATALL_ID, stat_name, stat_sub_id);
667 else if ( my_info_->parent_info && my_info_->canInsertStatistics() ) {
669 return my_info_->parent_info->component->registerStatistic_impl<T>(params, stat_name, stat_sub_id, level);
673 return getStatEngine()->createDisabledStatistic<T>();
696 template <
typename T>
698 SST::Params& params,
const std::string& stat_name,
const std::string& stat_sub_id =
"")
700 return registerStatistic_impl<T>(params, stat_name, stat_sub_id);
703 template <
typename T>
707 return registerStatistic_impl<T>(empty, stat_name, stat_sub_id);
710 template <
typename... Args>
711 Statistics::Statistic<std::tuple<Args...>>* registerMultiStatistic(
712 const std::string& stat_name,
const std::string& stat_sub_id =
"")
714 SST::Params empty {};
715 return registerStatistic_impl<std::tuple<Args...>>(empty, stat_name, stat_sub_id);
718 template <
typename... Args>
719 Statistics::Statistic<std::tuple<Args...>>* registerMultiStatistic(
720 SST::Params& params,
const std::string& stat_name,
const std::string& stat_sub_id =
"")
722 return registerStatistic_impl<std::tuple<Args...>>(params, stat_name, stat_sub_id);
725 template <
typename T>
726 Statistics::Statistic<T>*
registerStatistic(
const char* stat_name,
const char* stat_sub_id =
"")
757 template <
typename T>
760 std::string full_point_name =
getType() +
"." + point_name;
761 auto tools = getComponentProfileTools(full_point_name);
762 if ( tools.size() == 0 )
return nullptr;
764 typename T::ProfilePoint* ret =
new typename T::ProfilePoint();
765 for (
auto* x : tools ) {
766 T* tool =
dynamic_cast<T*
>(x);
767 if (
nullptr == tool ) {
769 fatal(CALL_INFO_LONG, 1,
"ERROR: wrong type of profiling tool for profiling point %s)\n",
786 template <
class T,
class... ARGS>
790 return Factory::getFactory()->CreateWithParams<T>(type, params, params, args...);
799 template <
class T,
class... ARGS>
800 T* loadComponentExtension(ARGS... args)
803 return static_cast<T*
>(ret);
816 return Factory::getFactory()->isSubComponentLoadableUsingAPI<T>(type);
835 const std::map<ComponentId_t, ComponentInfo>& subcomps = my_info_->getSubComponents();
838 for (
auto& ci : subcomps ) {
839 if ( ci.second.getSlotName() == slot_name ) {
840 index = ci.second.getSlotNum();
845 if ( sub_count > 1 ) {
847 outXX.
fatal(CALL_INFO, 1,
848 "Error: ComponentSlot \"%s\" in component \"%s\" only allows for one SubComponent, %d provided.\n",
849 slot_name.c_str(), my_info_->getType().c_str(), sub_count);
852 return isUserSubComponentLoadableUsingAPIByIndex<T>(slot_name, index);
873 template <
class T,
class... ARGS>
875 uint64_t share_flags,
Params& params, ARGS... args)
878 share_flags = share_flags & ComponentInfo::USER_FLAGS;
879 ComponentId_t cid = my_info_->addAnonymousSubComponent(my_info_, type, slot_name, slot_num, share_flags);
880 ComponentInfo* sub_info = my_info_->findSubComponent(cid);
883 if ( sub_info ==
nullptr )
return nullptr;
887 auto ret = Factory::getFactory()->CreateWithParams<T>(type, params, sub_info->id_, params, args...);
921 template <
class T,
class... ARGS>
928 const std::map<ComponentId_t, ComponentInfo>& subcomps = my_info_->getSubComponents();
931 for (
auto& ci : subcomps ) {
932 if ( ci.second.getSlotName() == slot_name ) {
933 index = ci.second.getSlotNum();
938 if ( sub_count > 1 ) {
940 outXX.
fatal(CALL_INFO, 1,
941 "Error: ComponentSlot \"%s\" in component \"%s\" only allows for one SubComponent, %d provided.\n",
942 slot_name.c_str(), my_info_->getType().c_str(), sub_count);
945 return loadUserSubComponentByIndex<T, ARGS...>(slot_name, index, share_flags, args...);
971 void fatal(uint32_t line,
const char* file,
const char* func,
int exit_code,
const char* format, ...) const
972 __attribute__((format(printf, 6, 7)));
998 void sst_assert(
bool condition, uint32_t line, const
char* file, const
char* func,
int exit_code,
999 const
char* format, ...) const __attribute__((format(printf, 7, 8)));
1002 SimTime_t processCurrentTimeWithUnderflowedBase(const std::
string& base) const;
1017 Statistics::
StatisticBase* createExplicitlyEnabledStatistic(SST::
Params& params, StatisticId_t
id,
1018 const std::
string& name, const std::
string& stat_sub_id, StatCreateFunction create);
1021 SST::
Params& params, const std::
string& name, const std::
string& stat_sub_id, StatCreateFunction create);
1025 void pushValidParams(
Params& params, const std::
string& type);
1027 template <class T, class... ARGS>
1028 T* loadUserSubComponentByIndex(const std::
string& slot_name,
int slot_num,
int share_flags, ARGS... args)
1031 share_flags = share_flags & ComponentInfo::USER_FLAGS;
1034 ComponentInfo* sub_info = my_info_->findSubComponent(slot_name, slot_num);
1035 if ( sub_info ==
nullptr )
return nullptr;
1036 sub_info->share_flags = share_flags;
1037 sub_info->parent_info = my_info_;
1040 auto ret = Factory::getFactory()->CreateWithParams<T>(
1041 sub_info->type, *sub_info->params, sub_info->id_, *sub_info->params, args...);
1048 bool isUserSubComponentLoadableUsingAPIByIndex(
const std::string& slot_name,
int slot_num)
1051 ComponentInfo* sub_info = my_info_->findSubComponent(slot_name, slot_num);
1052 if ( sub_info ==
nullptr )
return false;
1059 void vfatal(uint32_t line,
const char* file,
const char* func,
int exit_code,
const char* format, va_list arg)
const
1060 __attribute__((format(printf, 6, 0)));
1063 StatisticProcessingEngine* getStatEngine();
1066 SubComponentSlotInfo* getSubComponentSlotInfo(
const std::string& name,
bool fatalOnEmptyIndex =
false);
1077 bool isAnonymous() {
return my_info_->isAnonymous(); }
1079 bool isUser() {
return my_info_->isUser(); }
1086 TimeConverter getDefaultTimeBase() {
return my_info_->defaultTimeBase; }
1087 const TimeConverter getDefaultTimeBase()
const {
return my_info_->defaultTimeBase; }
1089 bool doesSubComponentExist(
const std::string& type);
1092 uint8_t getStatisticValidityAndLevel(
const std::string& statisticName)
const;
1094 std::vector<Profile::ComponentProfileTool*> getComponentProfileTools(
const std::string& point);
1151 enum class ComponentState : uint8_t {
1155 DoNotEndSim = 1 << 1,
1156 OKToEndSim = 1 << 2,
1167 bool isStatePrimary()
1169 return static_cast<uint8_t
>(component_state_) &
static_cast<uint8_t
>(ComponentState::Primary);
1177 bool isStateDoNotEndSim()
1179 return static_cast<uint8_t
>(component_state_) &
static_cast<uint8_t
>(ComponentState::DoNotEndSim);
1187 bool isStateOKToEndSim()
1189 return static_cast<uint8_t
>(component_state_) &
static_cast<uint8_t
>(ComponentState::OKToEndSim);
1199 return static_cast<uint8_t
>(component_state_) &
static_cast<uint8_t
>(ComponentState::Extension);
1209 void setStateAsPrimary()
1211 component_state_ =
static_cast<ComponentState
>(
1212 static_cast<uint8_t
>(component_state_) |
static_cast<uint8_t
>(ComponentState::Primary));
1221 void setStateDoNotEndSim()
1223 component_state_ =
static_cast<ComponentState
>(
1224 static_cast<uint8_t
>(component_state_) |
static_cast<uint8_t
>(ComponentState::DoNotEndSim));
1225 component_state_ =
static_cast<ComponentState
>(
1226 static_cast<uint8_t
>(component_state_) & ~static_cast<uint8_t>(ComponentState::OKToEndSim));
1235 void setStateOKToEndSim()
1237 component_state_ =
static_cast<ComponentState
>(
1238 static_cast<uint8_t
>(component_state_) |
static_cast<uint8_t
>(ComponentState::OKToEndSim));
1239 component_state_ =
static_cast<ComponentState
>(
1240 static_cast<uint8_t
>(component_state_) & ~static_cast<uint8_t>(ComponentState::DoNotEndSim));
1246 void setAsExtension()
1248 component_state_ =
static_cast<ComponentState
>(
1249 static_cast<uint8_t
>(component_state_) |
static_cast<uint8_t
>(ComponentState::Extension));
1253 friend class Core::Serialization::pvt::SerializeBaseComponentHelper;
1256 ComponentInfo* my_info_ =
nullptr;
1257 Simulation* sim_ =
nullptr;
1260 ComponentState component_state_ = ComponentState::None;
1265 std::vector<Clock::HandlerBase*> clock_handlers_;
1266 std::set<SimTime_t> registered_clocks_;
1268 void addSelfLink(
const std::string& name);
1269 Link* getLinkFromParentSharedPort(
const std::string& port, std::vector<ConfigPortModule>& port_modules);
1271 using StatNameMap = std::map<std::string, std::map<std::string, Statistics::StatisticBase*>>;
1273 ConfigPortModule& getPortModuleConfig(PortModuleId_t);
1275 static thread_local std::pair<ComponentId_t, PortModuleId_t> port_module_id_;
1277 std::vector<PortModule*> port_modules_;
1279 std::map<StatisticId_t, Statistics::StatisticBase*>
1280 explicitly_enabled_shared_stats_;
1283 std::map<StatisticId_t, StatNameMap>
1284 explicitly_enabled_unique_stats_;
1286 StatNameMap enabled_all_stats_;
1291 BaseComponent* getParentComponent()
1293 ComponentInfo* base_info = my_info_;
1294 while ( base_info->parent_info ) {
1295 base_info = base_info->parent_info;
1297 return base_info->component;
1305class SubComponentSlotInfo
1309 std::string slot_name;
1313 ~SubComponentSlotInfo() {}
1315 SubComponentSlotInfo(
BaseComponent* comp,
const std::string& slot_name) :
1317 slot_name(slot_name)
1319 const std::map<ComponentId_t, ComponentInfo>& subcomps = comp->my_info_->getSubComponents();
1322 max_slot_index = -1;
1323 for (
auto& ci : subcomps ) {
1324 if ( ci.second.getSlotName() == slot_name ) {
1325 if ( ci.second.getSlotNum() >
static_cast<int>(max_slot_index) ) {
1326 max_slot_index = ci.second.getSlotNum();
1332 const std::string& getSlotName()
const {
return slot_name; };
1334 bool isPopulated(
int slot_num)
const
1336 if ( slot_num > max_slot_index )
return false;
1337 if ( comp->my_info_->findSubComponent(slot_name, slot_num) ==
nullptr )
return false;
1341 bool isAllPopulated()
const
1343 for (
int i = 0; i < max_slot_index; ++i ) {
1344 if ( comp->my_info_->findSubComponent(slot_name, i) ==
nullptr )
return false;
1349 int getMaxPopulatedSlotNumber()
const {
return max_slot_index; }
1362 return comp->isUserSubComponentLoadableUsingAPIByIndex<T>(slot_name, slot_num);
1377 template <
typename T>
1381 return comp->loadUserSubComponentByIndex<T>(slot_name, slot_num, ComponentInfo::SHARE_NONE);
1396 template <
class T,
class... ARGS>
1397 T*
create(
int slot_num, uint64_t share_flags, ARGS... args)
const
1399 return comp->loadUserSubComponentByIndex<T, ARGS...>(slot_name, slot_num, share_flags, args...);
1416 template <
typename T,
class... ARGS>
1417 void createAll(std::vector<T*>& vec, uint64_t share_flags, ARGS... args)
const
1419 for (
int i = 0; i <= getMaxPopulatedSlotNumber(); ++i ) {
1420 T* sub =
create<T>(i, share_flags, args...);
1440 template <
typename T,
class... ARGS>
1441 void createAllSparse(std::vector<std::pair<int, T*>>& vec, uint64_t share_flags, ARGS... args)
const
1443 for (
int i = 0; i <= getMaxPopulatedSlotNumber(); ++i ) {
1444 T* sub =
create<T>(i, share_flags, args...);
1445 if ( sub !=
nullptr ) vec.push_back(i, sub);
1462 template <
typename T,
class... ARGS>
1465 for (
int i = 0; i <= getMaxPopulatedSlotNumber(); ++i ) {
1466 T* sub =
create<T>(i, share_flags, args...);
1467 if ( sub !=
nullptr ) vec.push_back(sub);
1472namespace Core::Serialization {
1493 void operator()(T*& s,
serializer& ser, ser_opt_t UNUSED(options))
1496 switch ( ser.mode() ) {
1497 case serializer::SIZER:
1498 pvt::SerializeBaseComponentHelper::size_basecomponent(sp, ser);
1500 case serializer::PACK:
1501 pvt::SerializeBaseComponentHelper::pack_basecomponent(sp, ser);
1503 case serializer::UNPACK:
1504 pvt::SerializeBaseComponentHelper::unpack_basecomponent(sp, ser);
1506 case serializer::MAP:
1507 pvt::SerializeBaseComponentHelper::map_basecomponent(sp, ser, ser.getMapName());
1510 s =
static_cast<T*
>(sp);
1513 SST_FRIEND_SERIALIZE();
Main component object for the simulation.
Definition baseComponent.h:67
bool isSimulationRunModeInit() const
Check to see if the run mode was set to INIT.
Definition baseComponent.cc:330
SimTime_t getCurrentSimTimeMilli() const
Utility function to return the time since the simulation began in milliseconds.
Definition baseComponent.cc:211
virtual void complete(unsigned int UNUSED(phase))
Used during the complete phase after the end of simulation.
Definition baseComponent.h:144
void requireLibrary(const std::string &name)
Signifies that a library is required for this simulation.
Definition baseComponent.cc:354
bool isSimulationRunModeRun() const
Check to see if the run mode was set to RUN.
Definition baseComponent.cc:336
void setDefaultTimeBase(TimeConverter tc)
Manually set the default defaultTimeBase.
Definition baseComponent.h:1084
bool isPortConnected(const std::string &name) const
Determine if a port name is connected to any links.
Definition baseComponent.cc:361
void fatal(uint32_t line, const char *file, const char *func, int exit_code, const char *format,...) const
Convenience function for reporting fatal conditions.
Definition baseComponent.cc:660
double getRunPhaseElapsedRealTime() const
Get the amount of real-time spent executing the run phase of the simulation.
Definition baseComponent.cc:220
void removeWatchPoint(WatchPoint *pt)
Remove a watch point from all handlers in the Component Tree.
Definition baseComponent.cc:252
T * loadUserSubComponent(const std::string &slot_name)
Loads a user defined subcomponent (defined in input file to SST run).
Definition baseComponent.h:903
const std::string & getName() const
Get the name of the BaseComponent.
Definition baseComponent.h:120
TimeConverter registerTimeBase(const std::string &base, bool reg_all=true)
Registers a default timebase for the component and optionally sets the the component's links to that ...
Definition baseComponent.cc:410
void registerAsPrimaryComponent()
Register as a primary component, which allows the component to specify when it is and is not OK to en...
Definition baseComponent.cc:870
TimeConverter registerClock(TimeConverter tc, Clock::HandlerBase *handler, bool reg_all=true)
Registers a clock for this component.
Definition baseComponent.cc:382
virtual void setup()
Called after all components have been constructed and initialization has completed,...
Definition baseComponent.h:150
uint8_t getStatisticLoadLevel() const
Get the BaseComponent Statistic load level.
Definition baseComponent.h:108
UnitAlgebra getCoreTimeBase() const
Get the core timebase.
Definition baseComponent.cc:118
Cycle_t reregisterClock(TimeConverter freq, Clock::HandlerBase *handler)
Reactivates an existing Clock and Handler.
Definition baseComponent.cc:396
void initiateInteractive(const std::string &msg)
Tell the simulation object to initiate interactive mode (if currently turned on).
Definition baseComponent.cc:437
std::string & getOutputDirectory() const
Returns the output directory of the simulation.
Definition baseComponent.cc:348
double getCompletePhaseElapsedRealTime() const
Get the amount of real-time spent executing the complete phase of the simulation.
Definition baseComponent.cc:232
void performStatisticOutput(Statistics::StatisticBase *stat)
Called by the Components and Subcomponent to perform a statistic Output.
Definition baseComponent.cc:647
int getCurrentPriority() const
Get the current priority.
Definition baseComponent.cc:130
double getInitPhaseElapsedRealTime() const
Get the amount of real-time spent executing the init phase of the simulation.
Definition baseComponent.cc:226
Link * configureSelfLink(const std::string &name, TimeConverter timebase, Event::HandlerBase *handler=nullptr)
Configure a SelfLink (Loopback link).
Definition baseComponent.h:435
void performGlobalStatisticOutput()
Performs a global statistic Output.
Definition baseComponent.cc:653
bool isSubComponentLoadableUsingAPI(const std::string &type)
Check to see if a given element type is loadable with a particular API.
Definition baseComponent.h:814
const std::vector< double > & getCoordinates() const
Retrieve the X,Y,Z coordinates of this component.
Definition baseComponent.h:1071
const std::string & getParentComponentName() const
Get the name of the parent Component for the Component tree.
Definition baseComponent.h:128
virtual void init(unsigned int UNUSED(phase))
Used during the init phase.
Definition baseComponent.h:136
SimTime_t getCurrentSimTime() const
Return the simulated time since the simulation began in the default timebase.
Definition baseComponent.h:236
UnitAlgebra getElapsedSimTime() const
get the elapsed simulation time as a UnitAlgebra
Definition baseComponent.cc:136
SimTime_t getCurrentSimTimeMicro() const
Utility function to return the time since the simulation began in microseconds.
Definition baseComponent.cc:203
void addWatchPoint(WatchPoint *pt)
Add a watch point to all handlers in the Component Tree.
Definition baseComponent.cc:239
static Output & getSimulationOutput()
Get the default simulation Output class instance.
Definition baseComponent.cc:166
RankInfo getNumRanks() const
Get the number of parallel ranks in the simulation.
Definition baseComponent.cc:160
UnitAlgebra getEndSimTime() const
Get the end simulation time as a UnitAlgebra.
Definition baseComponent.cc:148
void sst_assert(bool condition, uint32_t line, const char *file, const char *func, int exit_code, const char *format,...) const
Convenience function for testing for and reporting fatal conditions.
Definition baseComponent.cc:669
T::ProfilePoint * registerProfilePoint(const std::string &point_name)
Registers a profiling point.
Definition baseComponent.h:758
bool isSimulationRunModeBoth() const
Check to see if the run mode was set to BOTH.
Definition baseComponent.cc:342
RankInfo getRank() const
Get this instance's parallel rank.
Definition baseComponent.cc:154
virtual void emergencyShutdown()
Called when SIGINT or SIGTERM has been seen.
Definition baseComponent.h:113
SimTime_t getCurrentSimTime(const char *base) const
Return the simulated time since the simulation began in the specified timebase.
Definition baseComponent.h:275
void primaryComponentOKToEndSim()
Tells the simulation that it is now OK to end simulation.
Definition baseComponent.cc:909
Statistics::Statistic< T > * registerStatistic(SST::Params ¶ms, const std::string &stat_name, const std::string &stat_sub_id="")
Registers a statistic.
Definition baseComponent.h:697
T * loadUserSubComponent(const std::string &slot_name, uint64_t share_flags, ARGS... args)
Loads a user defined subcomponent (defined in input file to SST run).
Definition baseComponent.h:922
const std::string & getType() const
Gets the ELI type for this BaseComponent.
Definition baseComponent.h:94
SimTime_t getCurrentSimTimeNano() const
Utility function to return the time since the simulation began in nanoseconds.
Definition baseComponent.cc:195
T * loadAnonymousSubComponent(const std::string &type, const std::string &slot_name, int slot_num, uint64_t share_flags, Params ¶ms, ARGS... args)
Loads an anonymous subcomponent (not defined in input file to SST run).
Definition baseComponent.h:874
Cycle_t getNextClockCycle(TimeConverter freq)
Returns the next Cycle that the TimeConverter would fire.
Definition baseComponent.cc:403
void primaryComponentDoNotEndSim()
Tells the simulation that it should not exit.
Definition baseComponent.cc:889
ComponentId_t getId() const
Get the unique component ID.
Definition baseComponent.h:101
void unregisterClock(TimeConverter tc, Clock::HandlerBase *handler)
Removes a clock handler from the component.
Definition baseComponent.cc:390
bool isUserSubComponentLoadableUsingAPI(const std::string &slot_name)
Check to see if the element type loaded by the user into the.
Definition baseComponent.h:830
Link * configureLink(const std::string &name, TimeConverter timebase, Event::HandlerBase *handler=nullptr)
Configure a Link.
Definition baseComponent.h:408
virtual void finish()
Called after complete phase, but before objects are destroyed.
Definition baseComponent.h:155
SimTime_t getEndSimCycle() const
Get the end simulation time as a cycle count.
Definition baseComponent.cc:142
virtual bool Status()
Currently unused function.
Definition baseComponent.h:158
SimTime_t getCurrentSimCycle() const
Get the current simulation time as a cycle count.
Definition baseComponent.cc:124
virtual void printStatus(Output &UNUSED(out))
Called by the Simulation to request that the component print its current status.
Definition baseComponent.h:165
T * loadModule(const std::string &type, Params ¶ms, ARGS... args)
Loads a module from an element Library.
Definition baseComponent.h:787
A Clock class.
Definition clock.h:35
SSTHandlerBase< bool, Cycle_t > HandlerBase
Base handler for clock functions.
Definition clock.h:44
ComponentExtension is a class that can be loaded using loadComponentExtension<T>(....
Definition componentExtension.h:29
Definition componentInfo.h:45
Main component object for the simulation.
Definition component.h:32
Definition baseComponent.h:1476
Definition serializable_base.h:121
Base serialize class.
Definition serialize.h:132
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition serializer.h:43
SSTHandlerBase< void, Event * > HandlerBase
Base handler for event delivery.
Definition event.h:48
Maps port names to the Links that are connected to it.
Definition linkMap.h:30
Link between two components.
Definition link.h:57
Module is a tag class used with the loadModule function.
Definition module.h:26
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file.
Definition output.h:58
void fatal(uint32_t line, const char *file, const char *func, int exit_code, const char *format,...) const
Output the fatal message with formatting as specified by the format parameter.
Definition output.cc:156
@ STDERR
Definition output.h:65
Parameter store.
Definition params.h:65
Main control class for a SST Simulation.
Definition simulation.h:121
Forms the base class for statistics gathering within SST.
Definition statbase.h:51
An SST core component that handles timing and event processing informing all registered Statistics to...
Definition statengine.h:55
Forms the template defined base class for statistics gathering within SST.
Definition statbase.h:369
Used to load SubComponents when multiple SubComponents are loaded into a single slot (will also also ...
Definition baseComponent.h:1306
T * create(int slot_num) const
Create a user defined subcomponent (defined in input file to SST run).
Definition baseComponent.h:1378
void createAllSparse(std::vector< std::pair< int, T * > > &vec, uint64_t share_flags, ARGS... args) const
Create all user defined subcomponents (defined in input file to SST run) for the slot.
Definition baseComponent.h:1441
bool isLoadableUsingAPI(int slot_num)
Check to see if the element type loaded by the user into the specified slot index is loadable with a ...
Definition baseComponent.h:1360
void createAll(std::vector< T * > &vec, uint64_t share_flags, ARGS... args) const
Create all user defined subcomponents (defined in input file to SST run) for the slot.
Definition baseComponent.h:1417
T * create(int slot_num, uint64_t share_flags, ARGS... args) const
Create a user defined subcomponent (defined in input file to SST run).
Definition baseComponent.h:1397
void createAllSparse(std::vector< T * > &vec, uint64_t share_flags, ARGS... args) const
Create all user defined subcomponents (defined in input file to SST run) for the slot.
Definition baseComponent.h:1463
SubComponent is a class loadable through the factory which allows dynamic functionality to be added t...
Definition subcomponent.h:29
A class to convert between a component's view of time and the core's view of time.
Definition timeConverter.h:31
SimTime_t getFactor() const
Definition timeConverter.h:91
Performs Unit math in full precision.
Definition unitAlgebra.h:107
Class that can attach to Clock and Event Handlers to monitor the state of variables.
Definition watchPoint.h:28