Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
FatTreeZone: Add limiters for switches
[simgrid.git] / src / surf / sg_platf.cpp
index 0cf0c2c..e63fc05 100644 (file)
@@ -195,13 +195,7 @@ static simgrid::s4u::Link* sg_platf_cluster_create_limiter(const simgrid::kernel
                                                            simgrid::s4u::NetZone* zone,
                                                            const std::vector<unsigned int>& /*coord*/, int id)
 {
-  xbt_assert(static_cast<unsigned long>(id) < cluster->radicals.size(),
-             "Zone(%s): error when creating limiter for host number %d in the zone. Insufficient number of radicals "
-             "available "
-             "(total = %zu). Check the 'radical' parameter in XML",
-             cluster->id.c_str(), id, cluster->radicals.size());
-
-  std::string link_id = std::string(cluster->id) + "_link_" + std::to_string(cluster->radicals[id]) + "_limiter";
+  std::string link_id = std::string(cluster->id) + "_link_" + std::to_string(id) + "_limiter";
   XBT_DEBUG("Cluster: creating limiter link=%s bw=%f", link_id.c_str(), cluster->limiter_link);
 
   simgrid::s4u::Link* limiter = zone->create_link(link_id, cluster->limiter_link)->seal();
@@ -228,7 +222,7 @@ static void sg_platf_new_cluster_hierarchical(const simgrid::kernel::routing::Cl
     set_limiter = std::bind(sg_platf_cluster_create_limiter, cluster, _1, _2, _3);
   }
 
-  simgrid::s4u::NetZone* parent = routing_get_current() ? routing_get_current()->get_iface() : nullptr;
+  simgrid::s4u::NetZone const* parent = routing_get_current() ? routing_get_current()->get_iface() : nullptr;
   simgrid::s4u::NetZone* zone;
   switch (cluster->topology) {
     case simgrid::kernel::routing::ClusterTopology::TORUS:
@@ -248,7 +242,6 @@ static void sg_platf_new_cluster_hierarchical(const simgrid::kernel::routing::Cl
       break;
     default:
       THROW_IMPOSSIBLE;
-      break;
   }
   zone->seal();
 }