Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
StarZone::get_graph: link to the gateway router when available.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 17 May 2022 19:59:49 +0000 (21:59 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 17 May 2022 19:59:49 +0000 (21:59 +0200)
This may happen e.g. with nested StarZones.

src/kernel/routing/StarZone.cpp

index aab5ccd..a6ef423 100644 (file)
@@ -62,8 +62,9 @@ void StarZone::get_graph(const s_xbt_graph_t* graph, std::map<std::string, xbt_n
   xbt_node_t star_node = new_xbt_graph_node(graph, get_cname(), nodes);
 
   for (auto const& src : get_vertices()) {
+    const char* src_name = routes_[src->id()].gateway ? routes_[src->id()].gateway->get_cname() : src->get_cname();
+    xbt_node_t src_node  = new_xbt_graph_node(graph, src_name, nodes);
     /* going up */
-    xbt_node_t src_node = new_xbt_graph_node(graph, src->get_cname(), nodes);
     xbt_node_t previous = src_node;
     for (auto const* link : routes_[src->id()].links_up) {
       xbt_node_t current = new_xbt_graph_node(graph, link->get_cname(), nodes);