SimGrid  3.13
Versatile Simulation of Distributed Systems
simgrid::surf::AsImpl Class Referenceabstract

Autonomous Systems. More...

#include <AsImpl.hpp>

Inheritance diagram for simgrid::surf::AsImpl:
simgrid::surf::AsCluster simgrid::surf::AsNone simgrid::surf::AsRoutedGraph simgrid::surf::AsClusterFatTree simgrid::surf::AsClusterTorus simgrid::surf::AsVivaldi simgrid::surf::AsDijkstra simgrid::surf::AsFloyd simgrid::surf::AsFull

Public Types

enum  RoutingMode { RoutingMode::unset = 0, RoutingMode::base, RoutingMode::recursive }
 

Public Member Functions

virtual void getRouteAndLatency (surf::NetCard *src, surf::NetCard *dst, sg_platf_route_cbarg_t into, double *latency)=0
 Probe the routing path between two points. More...
 
virtual xbt_dynar_t getOneLinkRoutes ()
 retrieves the list of all routes of size 1 (of type src x dst x Link) More...
 
std::vector< surf::Link * > * getBypassRoute (surf::NetCard *src, surf::NetCard *dst)
 
virtual void getGraph (xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)=0
 

Static Public Member Functions

static void getRouteRecursive (surf::NetCard *src, surf::NetCard *dst, std::vector< surf::Link * > *links, double *latency)
 Recursive function for getRouteAndLatency. More...
 

Public Attributes

RoutingMode hierarchy_ = RoutingMode::unset
 
surf::NetCardnetcard_ = nullptr
 

Protected Member Functions

 AsImpl (const char *name)
 
 ~AsImpl ()
 

Detailed Description

Autonomous Systems.

An AS is a network container, in charge of routing information between elements (hosts) and to the nearby ASes. In SimGrid, there is a hierarchy of ASes, with a unique root AS (that you can retrieve from the s4u::Engine).

Member Enumeration Documentation

Enumerator
unset 

Undefined type.

base 

Base case: use simple link lists for routing.

recursive 

Recursive case: also return gateway informations.

Constructor & Destructor Documentation

simgrid::surf::AsImpl::AsImpl ( const char *  name)
protected
simgrid::surf::AsImpl::~AsImpl ( )
protected

Member Function Documentation

virtual void simgrid::surf::AsImpl::getRouteAndLatency ( surf::NetCard src,
surf::NetCard dst,
sg_platf_route_cbarg_t  into,
double *  latency 
)
pure virtual

Probe the routing path between two points.

The networking model uses this function when creating a communication to retrieve both the list of links that the create communication will use, and the summed latency that these links represent.

The network could recompute the latency by itself from the list, but it would require an additional link set traversal. This operation being on the critical path of SimGrid, the routing computes the latency in behalf of the network.

Things are rather complex here because we have to find the path from ASes to ASes, and within each. In addition, the different ASes may use differing routing models. Some ASes may be routed in full, others may have only some connection information and use a shortest path on top of that, and so on. Some ASes may even not have any predefined links and use only coordinate informations to compute the latency.

So, the path is constructed recursively, with each traversed AS adding its information to the set. The algorithm for that is explained in http://hal.inria.fr/hal-00650233/

Parameters
srcInitial point of the routing path
dstFinal point of the routing path
intoContainer into which the traversed links should be pushed
latencyAccumulator in which the latencies should be added (caller must set it to 0)

Implemented in simgrid::surf::AsClusterFatTree, simgrid::surf::AsDijkstra, simgrid::surf::AsFull, simgrid::surf::AsVivaldi, simgrid::surf::AsFloyd, simgrid::surf::AsNone, simgrid::surf::AsCluster, and simgrid::surf::AsClusterTorus.

xbt_dynar_t simgrid::surf::AsImpl::getOneLinkRoutes ( )
virtual

retrieves the list of all routes of size 1 (of type src x dst x Link)

Reimplemented in simgrid::surf::AsVivaldi, and simgrid::surf::AsRoutedGraph.

std::vector< surf::Link * > * simgrid::surf::AsImpl::getBypassRoute ( surf::NetCard src,
surf::NetCard dst 
)
virtual void simgrid::surf::AsImpl::getGraph ( xbt_graph_t  graph,
xbt_dict_t  nodes,
xbt_dict_t  edges 
)
pure virtual
void simgrid::surf::AsImpl::getRouteRecursive ( surf::NetCard src,
surf::NetCard dst,
std::vector< surf::Link * > *  links,
double *  latency 
)
static

Recursive function for getRouteAndLatency.

Parameters
srcthe source host
dstthe destination host
linksWhere to store the links and the gw information
latencyIf not NULL, the latency of all links will be added in it

Member Data Documentation

RoutingMode simgrid::surf::AsImpl::hierarchy_ = RoutingMode::unset
surf::NetCard* simgrid::surf::AsImpl::netcard_ = nullptr

The documentation for this class was generated from the following files: