SimGrid
3.13
Versatile Simulation of Distributed Systems
|
Autonomous Systems. More...
#include <AsImpl.hpp>
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::NetCard * | netcard_ = nullptr |
Protected Member Functions | |
AsImpl (const char *name) | |
~AsImpl () | |
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).
|
strong |
|
protected |
|
protected |
|
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/
src | Initial point of the routing path |
dst | Final point of the routing path |
into | Container into which the traversed links should be pushed |
latency | Accumulator 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.
|
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 | ||
) |
|
pure virtual |
Implemented in simgrid::surf::AsNone, simgrid::surf::AsRoutedGraph, and simgrid::surf::AsCluster.
|
static |
Recursive function for getRouteAndLatency.
src | the source host |
dst | the destination host |
links | Where to store the links and the gw information |
latency | If not NULL, the latency of all links will be added in it |
RoutingMode simgrid::surf::AsImpl::hierarchy_ = RoutingMode::unset |
surf::NetCard* simgrid::surf::AsImpl::netcard_ = nullptr |