SST 16.0.0
Structural Simulation Toolkit
SST::ConfigLink Class Reference

Represents the configuration of a generic Link. More...

#include <configLink.h>

Public Member Functions

LinkId_t key () const
 Function used when storing ConfigLinks in a SparseVectorMap.
SimTime_t getMinLatency () const
 Return the minimum latency of this link (from both sides).
std::string latency_str (uint32_t index) const
 Gets the latency as a string from the id stored in latency[].
void setAsNonLocal (int which_local, RankInfo remote_rank_info)
 Sets the link as a non-local link.
void print (std::ostream &os) const
 Print the Link information.
void serialize_order (SST::Core::Serialization::serializer &ser)
 Serializes the ConfigLink.

Data Fields

ComponentId_t component_ [2] = { UNSET_COMPONENT_ID, UNSET_COMPONENT_ID }
 Components that are connected to this link.
SimTime_t latency_ [2] = { 0, 0 }
 This is a dual purpose data member.
std::string name_
 Name of the link.
LinkId_t id_ = 0
 id of the link.
std::string port_ [2]
 Name of the ports the link is connected to.
bool no_cut_ = false
 Whether or not this link is set to be no-cut.
bool nonlocal_ = false
 Whether this link crosses the graph boundary and is connected on one end to a non-local component.
bool cross_rank_ = false
 Set to true if this is a cross rank link.
bool cross_thread_ = false
 Set to true if this is a cross thread link on same rank.

Friends

class ConfigGraph

Detailed Description

Represents the configuration of a generic Link.

Member Function Documentation

◆ getMinLatency()

SimTime_t SST::ConfigLink::getMinLatency ( ) const
inline

Return the minimum latency of this link (from both sides).

For non local links, it will return the local latency

References latency_, and nonlocal_.

Referenced by SST::Simulation::processGraphInfo().

◆ latency_str()

std::string SST::ConfigLink::latency_str ( uint32_t index) const

Gets the latency as a string from the id stored in latency[].

This is only allowed to be called during graph construction. After post-graph construction checks, the latency[] array no longer hold indices to the strings.

See also
latency_

References SST::TimeLord::getTimeBase(), SST::Simulation::getTimeLord(), and latency_.

◆ setAsNonLocal()

void SST::ConfigLink::setAsNonLocal ( int which_local,
RankInfo remote_rank_info )

Sets the link as a non-local link.

After the call, the local information will be held in index 0 of the various arrays, regardless of which component index holds the local information before the call.

Parameters
which_localspecifies which index is for the local side of the link
remote_rank_infoRank of the remote side of the link

References component_, latency_, nonlocal_, and port_.

Field Documentation

◆ component_

ComponentId_t SST::ConfigLink::component_[2] = { UNSET_COMPONENT_ID, UNSET_COMPONENT_ID }

Components that are connected to this link.

They are filled in the order they are attached in. If the link is marked as non-local, then component[1] holds the rank of the remote component. IDs of the connected components

Referenced by SST::ConfigGraph::addLink(), SST::ConfigGraph::addNonLocalLink(), SST::ConfigGraph::checkForStructuralErrors(), SST::ConfigComponent::checkPorts(), print(), SST::Simulation::processGraphInfo(), serialize_order(), and setAsNonLocal().

◆ id_

LinkId_t SST::ConfigLink::id_ = 0

id of the link.

This is used primarily to find the link in ConfigGraph::links. For parallel loads, the link ID is only unique on a given rank, not globally.

The ID's are not carried over to the simulation objects

Referenced by SST::ConfigGraph::addLink(), key(), print(), and serialize_order().

◆ latency_

SimTime_t SST::ConfigLink::latency_[2] = { 0, 0 }

This is a dual purpose data member.

Graph construction - during graph construction, it holds the index into the LinkLatencyVector, which maps the stored index to the actual latency string. This is done to reduce memory usage because we assume there will be a small number of different latencies specified.

Post graph construction - after graph construction, the latency index is replaced with the SimTime_t value representing the specified latency that will be used by the link to add the specified latency to the event.

In both cases, the indices match the indices found in the component array, and represent the latency of the link for events sent from the corresponding component.

If the link is marked as non-local, then latency[1] holds the thread of the remote component.

Referenced by SST::ConfigGraph::addLink(), SST::ConfigGraph::addNonLocalLink(), SST::ConfigGraph::createLink(), getMinLatency(), latency_str(), print(), serialize_order(), and setAsNonLocal().

◆ name_

std::string SST::ConfigLink::name_

Name of the link.

This is used in two ways:

Errors - if an error is found in the graph construction, the name is used to report the error to the user

Parallel load - for parallel load, links that cross partition boundaries are connected by matching link names

Link names are not carried over to the simulation objects

Referenced by SST::ConfigGraph::addLink(), SST::ConfigGraph::addNonLocalLink(), SST::ConfigGraph::checkForStructuralErrors(), SST::ConfigComponent::checkPorts(), print(), and serialize_order().

◆ nonlocal_

bool SST::ConfigLink::nonlocal_ = false

Whether this link crosses the graph boundary and is connected on one end to a non-local component.

If set to true, there will only be one component connected (information in index 0 for the arrays) and the rank for the remote component will be stored in component[1] and the thread in latency[1].

Referenced by SST::ConfigGraph::addLink(), SST::ConfigGraph::addNonLocalLink(), SST::ConfigGraph::checkForStructuralErrors(), SST::ConfigComponent::checkPorts(), getMinLatency(), print(), SST::Simulation::processGraphInfo(), serialize_order(), and setAsNonLocal().

◆ port_

std::string SST::ConfigLink::port_[2]

Name of the ports the link is connected to.

The indices match the ones used in the component array

Referenced by SST::ConfigGraph::addLink(), SST::ConfigComponent::checkPorts(), print(), serialize_order(), and setAsNonLocal().


The documentation for this class was generated from the following files:
  • src/sst/core/model/configLink.h
  • src/sst/core/model/configLink.cc