SST/macro
Macros | Functions
topology.h File Reference
#include <sstmac/common/rng.h>
#include <sstmac/hardware/interconnect/interconnect_fwd.h>
#include <sstmac/hardware/topology/coordinates.h>
#include <sstmac/hardware/topology/traffic/traffic.h>
#include <sstmac/hardware/router/routable.h>
#include <sstmac/hardware/router/routing_enum.h>
#include <sstmac/hardware/router/router_fwd.h>
#include <sstmac/hardware/common/connection.h>
#include <sstmac/backends/common/sim_partition_fwd.h>
#include <sprockit/sim_parameters_fwd.h>
#include <sprockit/debug.h>
#include <sprockit/factories/factory.h>
#include <sprockit/unordered.h>
Include dependency graph for topology.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define top_debug(...)   debug_printf(sprockit::dbg::topology, __VA_ARGS__)
 

Functions

 DeclareDebugSlot (topology) namespace sstmac
 

Macro Definition Documentation

#define top_debug (   ...)    debug_printf(sprockit::dbg::topology, __VA_ARGS__)

Function Documentation

DeclareDebugSlot ( topology  )

Given a switch address, return number of nodes connected to it

For indirect networks, this includes all switches - those connected directly to nodes and internal switches that are only a part of the network

Returns
The total number of switches
The total number of nodes

Given a set of connectables, connect them appropriately

Parameters
objectsThe set of objects to connect
clonerIf in parallel mode, not all objects may exist. The factory creates missing objects.
Exceptions
value_errorIf invalid switchid is passed to cloner

For a given node, determine the injection switch All messages from this node inject into the network through this switch

Parameters
nodeaddrThe node to inject to
switch_port[inout] The port on the switch the node injects on
Returns
The switch that injects from the node

For a given node, determine the ejection switch All messages to this node eject into the network through this switch

Parameters
nodeaddrThe node to eject from
switch_port[inout] The port on the switch the node ejects on
Returns
The switch that ejects into the node

For a given node, determine the ejection switch All messages to this node eject into the network through this switch

Parameters
nodeaddrThe node to eject from
switch_port[inout] The port on the switch the node ejects on
Returns
The switch that ejects into the node

For a given node, determine the ejection switch All messages to this node eject into the network through this switch

Parameters
nodeaddrThe node to eject from
switch_port[inout] The port on the switch the node ejects on
Returns
The switch that ejects into the node

For a given input switch, return all nodes connected to it. This return vector might be empty if the switch is an internal switch not connected to any nodes

Exceptions
value_errorIf invalid switch id is given
Returns
The nodes connected to switch
Parameters
dimThe dimension (e.g. x, y, or z) that should be routed on next. Integer value has different meaning depending on type of router (torus/dragonfly/etc)
dirThe direction (e.g. +/-) that should be routed on. Integer value has different physical meaning depending on type of router (torus/dragonly/etc)
Returns
The port number on a switch that the message should be routed through for a given dim/dir

Given the current location and a destination, compute the minimal path to the destination. The path generally consists of a dimension, a direction or branch along that dimension, a port number for that dim/dir combination, and a virtual channel along the dim/dir appropriate for avoiding deadlock.

Parameters
current_sw_addrThe addr of the current switch
dest_sw_addrThe addr of the destination switch
path[inout] A complete path descriptor to the destination switch

Given a traffic pattern (e.g. bit-complement), return the partner nodes a given source node needs to send messages to for the given traffic pattern

Parameters
tyThe desired traffic pattern
src_nodeThe source node that sends messages
partners[inout] The list of partner nodes to send to

Given a traffic pattern (e.g. bit-complement), return the partner nodes a given destination node needs to receive messages to for the given traffic pattern

Parameters
tyThe desired traffic pattern
src_nodeThe source node that sends messages
partners[inout] The list of partner nodes to send to

Figure out how many hops we have to go from a source node to a destination node

Parameters
srcThe source node address
dstThe destination node address
Returns
The number of hops to destination

Generate a path that is considered the cheapest, given the statistics of the inteconnect. The 3 argument version should be a pure virtual function, but for now, will just return an empty path.

Parameters
srcThe source node address
dstThe destination node address
statsA pointer to the statistics data; Type will change once established
Returns
The path chosen by the topology

Template utility function for allowing any specific map type to be connected. This creates an equivalent map of connectables that then calls the actual #connect_objects function

Parameters
objectsA map of connectable* types (map might hold more specific type like networkswitch)

Template utility function for allowing any specific map type to be connected. This creates an equivalent map of connectables that then calls the actual #connect_objects function

Parameters
objectsA map of connectable* types (map might hold more specific type like networkswitch)

Get a random switch from the topoology. This is most often used in things like valiant routing. The input parameter avoids accidentally returning the exact same switch you are currently on.

Parameters
current_swThe current location switch
Returns
A random switch different from current_sw

For a given node, determine the injection switch All messages from this node inject into the network through this switch

Parameters
nodeaddrThe node to inject to
Returns
The switch that injects from the node

For a given node, determine the ejection switch All messages to this node eject into the network through this switch

Parameters
nodeaddrThe node to eject from
Returns
The switch that ejects into the node

Return the port number for the ith injection/ejection node

Parameters
ithThe injection/ejection index
Returns

Given the current location and a destination, compute the minimal path to the destination. In most cases, this function first computes the destination switch attached to the node and then calls #minimal_route_to_switch. The path generally consists of a dimension, a direction or branch along that dimension, a port number for that dim/dir combination, and a virtual channel along the dim/dir appropriate for avoiding deadlock.

Parameters
current_sw_addrThe addr of the current switch
dest_sw_addrThe addr of the destination switch
path[inout] A complete path descriptor to the destination node

Informs topology that a new routing stage has begun, allowing any topology specific state to be modified.

Parameters
rinfoRouting info object

Nodes per switch. The number of nodes connected to a leaf switch. In many topologies, there is a 1-1 correspondence. For others, you might have many compute nodes connected to a single injection/ejection switch.

Definition at line 29 of file topology.h.

References sstmac::hw::DeclareFactory().

Here is the call graph for this function: