Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't explode here, as flatifier may try exactly to do this.
authordegomme <adegomme@users.noreply.github.com>
Mon, 15 Apr 2019 10:44:47 +0000 (12:44 +0200)
committerdegomme <adegomme@users.noreply.github.com>
Mon, 15 Apr 2019 10:50:31 +0000 (12:50 +0200)
src/kernel/routing/ClusterZone.cpp

index 021eddd..e49e486 100644 (file)
@@ -29,12 +29,14 @@ void ClusterZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArg
              "Cluster routing: no links attached to the source node - did you use host_link tag?");
 
   if ((src->id() == dst->id()) && has_loopback_) {
-    xbt_assert(not src->is_router(), "Routing from a cluster private router to itself is meaningless");
-
-    std::pair<resource::LinkImpl*, resource::LinkImpl*> info = private_links_.at(node_pos(src->id()));
-    route->link_list.push_back(info.first);
-    if (lat)
-      *lat += info.first->get_latency();
+    if (src->is_router()) {
+      XBT_WARN("Routing from a cluster private router to itself is meaningless");
+    } else {
+      std::pair<resource::LinkImpl*, resource::LinkImpl*> info = private_links_.at(node_pos(src->id()));
+      route->link_list.push_back(info.first);
+      if (lat)
+        *lat += info.first->get_latency();
+    }
     return;
   }