]> AND Public Git Repository - simgrid.git/blobdiff - src/surf/sg_platf.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
do not use RouteCreationArgs outside of XML parsing
[simgrid.git] / src / surf / sg_platf.cpp
index cf04a3b4cd4c23bd24f89028726bfd52074ba398..0cf0c2c9e6289f9ee7d3c28d900bb53a84b34224 100644 (file)
@@ -217,8 +217,8 @@ static void sg_platf_new_cluster_hierarchical(const simgrid::kernel::routing::Cl
   using simgrid::kernel::routing::TorusZone;
 
   auto set_host = std::bind(sg_platf_cluster_create_host, cluster, _1, _2, _3);
-  std::function<simgrid::s4u::ClusterLinkCb> set_loopback{};
-  std::function<simgrid::s4u::ClusterLinkCb> set_limiter{};
+  std::function<simgrid::s4u::ClusterCallbacks::ClusterLinkCb> set_loopback{};
+  std::function<simgrid::s4u::ClusterCallbacks::ClusterLinkCb> set_limiter{};
 
   if (cluster->loopback_bw > 0 || cluster->loopback_lat > 0) {
     set_loopback = std::bind(sg_platf_cluster_create_loopback, cluster, _1, _2, _3);
@@ -233,18 +233,18 @@ static void sg_platf_new_cluster_hierarchical(const simgrid::kernel::routing::Cl
   switch (cluster->topology) {
     case simgrid::kernel::routing::ClusterTopology::TORUS:
       zone = simgrid::s4u::create_torus_zone(
-          cluster->id, parent, TorusZone::parse_topo_parameters(cluster->topo_parameters), cluster->bw, cluster->lat,
-          cluster->sharing_policy, set_host, set_loopback, set_limiter);
+          cluster->id, parent, TorusZone::parse_topo_parameters(cluster->topo_parameters),
+          {set_host, set_loopback, set_limiter}, cluster->bw, cluster->lat, cluster->sharing_policy);
       break;
     case simgrid::kernel::routing::ClusterTopology::DRAGONFLY:
       zone = simgrid::s4u::create_dragonfly_zone(
-          cluster->id, parent, DragonflyZone::parse_topo_parameters(cluster->topo_parameters), cluster->bw,
-          cluster->lat, cluster->sharing_policy, set_host, set_loopback, set_limiter);
+          cluster->id, parent, DragonflyZone::parse_topo_parameters(cluster->topo_parameters),
+          {set_host, set_loopback, set_limiter}, cluster->bw, cluster->lat, cluster->sharing_policy);
       break;
     case simgrid::kernel::routing::ClusterTopology::FAT_TREE:
       zone = simgrid::s4u::create_fatTree_zone(
-          cluster->id, parent, FatTreeZone::parse_topo_parameters(cluster->topo_parameters), cluster->bw, cluster->lat,
-          cluster->sharing_policy, set_host, set_loopback, set_limiter);
+          cluster->id, parent, FatTreeZone::parse_topo_parameters(cluster->topo_parameters),
+          {set_host, set_loopback, set_limiter}, cluster->bw, cluster->lat, cluster->sharing_policy);
       break;
     default:
       THROW_IMPOSSIBLE;
@@ -323,8 +323,9 @@ static void sg_platf_new_cluster_flat(simgrid::kernel::routing::ClusterCreationA
       current_zone->add_private_link_at(current_zone->node_pos_with_loopback(rankId), {limiter, limiter});
     }
 
+    current_zone->set_link_characteristics(cluster->bw, cluster->lat, cluster->sharing_policy);
     // call the cluster function that adds the others links
-    current_zone->create_links_for_node(cluster, i, rankId, current_zone->node_pos_with_loopback_limiter(rankId));
+    current_zone->create_links(i, rankId);
     rankId++;
   }