Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add an assert in case a platform using cluster routing does not link nodes to links...
authordegomme <augustin.degomme@unibas.ch>
Wed, 13 Jul 2016 13:00:54 +0000 (15:00 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Wed, 13 Jul 2016 13:30:05 +0000 (15:30 +0200)
This is related to https://github.com/simgrid/simgrid/issues/96

src/surf/AsCluster.cpp

index 228a0fa..100ff55 100644 (file)
@@ -26,7 +26,7 @@ void AsCluster::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cb
   s_surf_parsing_link_up_down_t info;
   XBT_VERB("cluster_get_route_and_latency from '%s'[%d] to '%s'[%d]",
             src->name(), src->id(), dst->name(), dst->id());
-
+  xbt_assert(!xbt_dynar_is_empty(privateLinks_), "Cluster routing : no links attached to the source node - did you use host_link tag?");
   if (! src->isRouter()) {    // No specific link for router
 
     if((src->id() == dst->id()) && hasLoopback_ ){