Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/sst/core/baseComponent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ BaseComponent::configureLink_impl(const std::string& name, SimTime_t timebase, E
}
}
tmp->setDefaultTimeBase(timebase);
tmp->setTag(getNextLinkOrder());
#ifdef __SST_DEBUG_EVENT_TRACKING__
tmp->setSendingComponentInfo(my_info_->getName(), my_info_->getType(), name);
#endif
Expand Down Expand Up @@ -843,6 +844,12 @@ BaseComponent::pushValidParams(Params& params, const std::string& type)
params.pushAllowedKeys(Factory::getFactory()->getParamNames(type));
}

uint32_t
BaseComponent::getNextLinkOrder()
{
return getParentComponent()->getNextLinkOrder();
}


void
BaseComponent::vfatal(
Expand Down
6 changes: 6 additions & 0 deletions src/sst/core/baseComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,12 @@ class BaseComponent : public SST::Core::Serialization::serializable_base
void serialize_order(SST::Core::Serialization::serializer& ser) override;


/**
Gets the next value or the order field of the link. The ordering of events based on links will be based on
the order that configureLink() is called.
*/
virtual uint32_t getNextLinkOrder();

/**
Handles the profile points, default timebase, handler tracking and checkpointing.

Expand Down
7 changes: 7 additions & 0 deletions src/sst/core/component.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "sst/core/eli/elementinfo.h"
#include "sst/core/sst_types.h"

#include <cstdint>
#include <map>

using namespace SST::Statistics;
Expand Down Expand Up @@ -58,6 +59,12 @@ class Component : public BaseComponent
protected:
friend class SubComponent;
Component() = default; // For Serialization only

private:

uint32_t getNextLinkOrder() override { return next_event_order_++; }

uint32_t next_event_order_ = 1;
};

} // namespace SST
Expand Down
2 changes: 1 addition & 1 deletion src/sst/core/componentExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ComponentExtension : public BaseComponent
ComponentExtension() = default; // For serialization only

void serialize_order(SST::Core::Serialization::serializer& ser) override;
ImplementSerializable(SST::ComponentExtension)
ImplementSerializable(SST::ComponentExtension);
};

} // namespace SST
Expand Down
6 changes: 3 additions & 3 deletions src/sst/core/componentInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ ComponentInfo::ComponentInfo(
ComponentInfo::ComponentInfo(ComponentInfo&& o) :
id_(o.id_),
parent_info(o.parent_info),
name(std::move(o.name)),
type(std::move(o.type)),
name(o.name),
type(o.type),
link_map(o.link_map),
component(o.component),
subComponents(std::move(o.subComponents)),
Expand All @@ -170,7 +170,7 @@ ComponentInfo::ComponentInfo(ComponentInfo&& o) :
statLoadLevel(o.statLoadLevel),
coordinates(std::move(o.coordinates)),
subIDIndex(o.subIDIndex),
slot_name(std::move(o.slot_name)),
slot_name(o.slot_name),
slot_num(o.slot_num),
share_flags(o.share_flags)
{
Expand Down
7 changes: 2 additions & 5 deletions src/sst/core/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ class Event : public Activity
local links, delivery_info contains the delivery functor.
@return void
*/
inline void setDeliveryInfo(LinkId_t tag, uintptr_t delivery_info)
inline void setDeliveryInfo(uint32_t order_tag, uintptr_t delivery_info)
{
setOrderTag(tag);
setOrderTag(order_tag);
this->delivery_info = delivery_info;
}

Expand All @@ -228,9 +228,6 @@ class Event : public Activity
/** Gets the link id used for delivery. For use by SST Core only */
inline Link* getDeliveryLink() { return reinterpret_cast<Link*>(delivery_info); }

/** Gets the link id associated with this event. For use by SST Core only */
inline LinkId_t getTag() const { return getOrderTag(); }


/** Holds the delivery information. This is stored as a
uintptr_t, but is actually a pointer converted using
Expand Down
2 changes: 1 addition & 1 deletion src/sst/core/factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Factory::CreateComponent(ComponentId_t id, const std::string& type, Params& para
bool
Factory::DoesSubComponentSlotExist(const std::string& type, const std::string& slotName)
{
std::string compTypeToLoad = type;
const std::string& compTypeToLoad = type;

std::string elemlib, elem;
std::tie(elemlib, elem) = parseLoadName(compTypeToLoad);
Expand Down
20 changes: 10 additions & 10 deletions src/sst/core/impl/interactive/simpleDebug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ SimpleDebugger::cmd_help(std::vector<std::string>& tokens)
}

if ( tokens.size() > 1 ) {
std::string c = tokens[1];
const std::string& c = tokens[1];
if ( cmdHelp.find(c) != cmdHelp.end() ) {
std::cout << c << " " << cmdHelp.at(c) << std::endl;
}
Expand Down Expand Up @@ -559,8 +559,8 @@ SimpleDebugger::cmd_print(std::vector<std::string>& tokens)
}

// See if have a -r or not
int recurse = 0;
std::string tok = tokens[1];
int recurse = 0;
const std::string& tok = tokens[1];
if ( tok.size() >= 2 && tok[0] == '-' && tok[1] == 'r' ) {
// Got a -r
std::string num = tok.substr(2);
Expand Down Expand Up @@ -744,7 +744,7 @@ SimpleDebugger::cmd_setHandler(std::vector<std::string>& tokens)
size_t tindex = 2;
unsigned handler = 0;
while ( tindex < tokens.size() ) {
std::string type = tokens[tindex++];
const std::string& type = tokens[tindex++];
// printf("%s ", type.c_str());

if ( type == "bc" )
Expand Down Expand Up @@ -802,7 +802,7 @@ SimpleDebugger::cmd_addTraceVar(std::vector<std::string>& tokens)
// Get trace vars and add associated objectBuffers
size_t tindex = 2;
while ( tindex < tokens.size() ) {
std::string tvar = tokens[tindex++];
const std::string& tvar = tokens[tindex++];
// printf("%s ", tvar.c_str());

// Find and check trace variable
Expand Down Expand Up @@ -1070,12 +1070,12 @@ Core::Serialization::ObjectMapComparison*
parseComparison(std::vector<std::string>& tokens, size_t& index, Core::Serialization::ObjectMap* obj, std::string& name)
{
// Get first comparison
std::string var = tokens[index++];
const std::string& var = tokens[index++];
if ( index >= tokens.size() ) {
printf("Invalid format for trigger test\n");
return nullptr;
}
std::string opstr = tokens[index++];
const std::string& opstr = tokens[index++];
Core::Serialization::ObjectMapComparison::Op op =
Core::Serialization::ObjectMapComparison::getOperationFromString(opstr);

Expand Down Expand Up @@ -1165,7 +1165,7 @@ parseComparison(std::vector<std::string>& tokens, size_t& index, Core::Serializa
WatchPoint::WPAction*
parseAction(std::vector<std::string>& tokens, size_t& index, Core::Serialization::ObjectMap* obj)
{
std::string action = tokens[index++];
const std::string& action = tokens[index++];

if ( action == "interactive" ) {
return new WatchPoint::InteractiveWPAction();
Expand All @@ -1188,14 +1188,14 @@ parseAction(std::vector<std::string>& tokens, size_t& index, Core::Serialization
printf("Missing variable for set command\n");
return nullptr;
}
std::string tvar = tokens[index++];
const std::string& tvar = tokens[index++];
// printf("%s ", tvar.c_str());

if ( index >= tokens.size() ) {
printf("Missing value for set command\n");
return nullptr;
}
std::string tval = tokens[index++];
const std::string& tval = tokens[index++];

// Find and check variable
Core::Serialization::ObjectMap* map = obj->findVariable(tvar);
Expand Down
2 changes: 1 addition & 1 deletion src/sst/core/link.cc
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ Link::Link() :
current_time(Simulation_impl::getSimulation()->currentSimCycle),
type(UNINITIALIZED),
mode(INIT),
tag(-1),
tag(type_max<uint32_t>),
attached_tools(nullptr)
{}

Expand Down
Loading