From b74cfd6dd5a13103459c5710a52d8a6054bada8d Mon Sep 17 00:00:00 2001 From: Bruno Donassolo Date: Thu, 29 Apr 2021 12:49:12 +0200 Subject: [PATCH] Use new API to create Torus/Dragonfly/Fat-Tree clusters from XML. Get rid of ClusterCreationArgs in Torus/Dragonfly/Fat-tree. NOTE: Routers aren't created anymore for Torus/Dragonfly/Fat-tree zones. - This router was lost in the middle of topology connected through empty routes (no links) - In the past, the sg_platf created a router automatically for these netzones since they shared the same sg_platf_new_cluster function. - Impact on flatfier test: cluster_torus.xml. --- .../simgrid/kernel/routing/ClusterZone.hpp | 6 +- .../simgrid/kernel/routing/DragonflyZone.hpp | 8 +- .../simgrid/kernel/routing/FatTreeZone.hpp | 8 +- include/simgrid/kernel/routing/TorusZone.hpp | 11 +- src/kernel/routing/ClusterZone.cpp | 2 +- src/kernel/routing/DragonflyZone.cpp | 32 +++-- src/kernel/routing/FatTreeZone.cpp | 11 +- src/kernel/routing/TorusZone.cpp | 88 ++------------ src/surf/sg_platf.cpp | 112 +++++++++++++++--- teshsuite/simdag/flatifier/flatifier.tesh | 76 ------------ 10 files changed, 152 insertions(+), 202 deletions(-) diff --git a/include/simgrid/kernel/routing/ClusterZone.hpp b/include/simgrid/kernel/routing/ClusterZone.hpp index 3ead7da3d3..fb6a615dcf 100644 --- a/include/simgrid/kernel/routing/ClusterZone.hpp +++ b/include/simgrid/kernel/routing/ClusterZone.hpp @@ -105,11 +105,7 @@ public: void get_graph(const s_xbt_graph_t* graph, std::map>* nodes, std::map>* edges) override; - virtual void create_links_for_node(ClusterCreationArgs* cluster, int id, int rank, unsigned int position); - virtual void parse_specific_arguments(ClusterCreationArgs*) - { - /* this routing method does not require any specific argument */ - } + void create_links_for_node(const ClusterCreationArgs* cluster, int id, int rank, unsigned int position); unsigned int node_pos(int id) const { return id * num_links_per_node_; } unsigned int node_pos_with_loopback(int id) const { return node_pos(id) + (has_loopback_ ? 1 : 0); } diff --git a/include/simgrid/kernel/routing/DragonflyZone.hpp b/include/simgrid/kernel/routing/DragonflyZone.hpp index d5f77ddf6e..19f1f4a67c 100644 --- a/include/simgrid/kernel/routing/DragonflyZone.hpp +++ b/include/simgrid/kernel/routing/DragonflyZone.hpp @@ -69,7 +69,13 @@ public: explicit DragonflyZone(const std::string& name); void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override; - void parse_specific_arguments(ClusterCreationArgs* cluster) override; + /** + * @brief Parse topology parameters from string format + * + * @param topo_parameters Topology parameters, e.g. "3,4 ; 3,2 ; 3,1 ; 2" + */ + static s4u::DragonflyParams parse_topo_parameters(const std::string& topo_parameters); + /** @brief Checks topology parameters */ static void check_topology(unsigned int n_groups, unsigned int groups_links, unsigned int n_chassis, unsigned int chassis_links, unsigned int n_routers, unsigned int routers_links, diff --git a/include/simgrid/kernel/routing/FatTreeZone.hpp b/include/simgrid/kernel/routing/FatTreeZone.hpp index 71e2de72a8..7f064e7107 100644 --- a/include/simgrid/kernel/routing/FatTreeZone.hpp +++ b/include/simgrid/kernel/routing/FatTreeZone.hpp @@ -141,8 +141,12 @@ public: ~FatTreeZone() override; void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override; - /** @brief Read the parameters in topo_parameters field. */ - void parse_specific_arguments(ClusterCreationArgs* cluster) override; + /** + * @brief Parse the topology parameters from string format + * + * @param topo_parameters String with topology, e.g. "2;4,4;1,2;1,2" + */ + static s4u::FatTreeParams parse_topo_parameters(const std::string& topo_parameters); /** @brief Checks topology parameters */ static void check_topology(unsigned int n_levels, const std::vector& down_links, const std::vector& up_links, const std::vector& link_count); diff --git a/include/simgrid/kernel/routing/TorusZone.hpp b/include/simgrid/kernel/routing/TorusZone.hpp index 6dcee3c006..fbfd798ce9 100644 --- a/include/simgrid/kernel/routing/TorusZone.hpp +++ b/include/simgrid/kernel/routing/TorusZone.hpp @@ -21,21 +21,22 @@ namespace routing { class XBT_PRIVATE TorusZone : public ClusterZone { std::vector dimensions_; + s4u::Link::SharingPolicy link_sharing_policy_; //!< torus links: sharing policy + double link_bw_; //!< torus links: bandwidth + double link_lat_; //!< torus links: latency public: using ClusterZone::ClusterZone; - void create_links_for_node(ClusterCreationArgs* cluster, int id, int rank, unsigned int position) override; + void create_links_for_node(int id, int rank, unsigned int position); void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override; - void parse_specific_arguments(ClusterCreationArgs* cluster) override; void set_topology(const std::vector& dimensions); /** @brief Convert topology parameters from string to vector of uint */ static std::vector parse_topo_parameters(const std::string& topo_parameters); + /** @brief Set the characteristics of links inside the Torus zone */ + void set_link_characteristics(double bw, double lat, s4u::Link::SharingPolicy sharing_policy); }; -/** @brief Create a regular torus zone with hosts as leafs */ -s4u::NetZone* create_torus_zone_with_hosts(const ClusterCreationArgs* cluster, const s4u::NetZone* parent); - } // namespace routing } // namespace kernel } // namespace simgrid diff --git a/src/kernel/routing/ClusterZone.cpp b/src/kernel/routing/ClusterZone.cpp index cb0f886e8b..fc35ba1b3c 100644 --- a/src/kernel/routing/ClusterZone.cpp +++ b/src/kernel/routing/ClusterZone.cpp @@ -141,7 +141,7 @@ void ClusterZone::get_graph(const s_xbt_graph_t* graph, std::mapid + "_link_" + std::to_string(id); diff --git a/src/kernel/routing/DragonflyZone.cpp b/src/kernel/routing/DragonflyZone.cpp index ebb1a7200e..4a72dee9d4 100644 --- a/src/kernel/routing/DragonflyZone.cpp +++ b/src/kernel/routing/DragonflyZone.cpp @@ -68,11 +68,11 @@ void DragonflyZone::set_topology(unsigned int n_groups, unsigned int groups_link num_nodes_per_blade_ = nodes; } -void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster) +s4u::DragonflyParams DragonflyZone::parse_topo_parameters(const std::string& topo_parameters) { std::vector parameters; std::vector tmp; - boost::split(parameters, cluster->topo_parameters, boost::is_any_of(";")); + boost::split(parameters, topo_parameters, boost::is_any_of(";")); if (parameters.size() != 4) surf_parse_error( @@ -83,14 +83,16 @@ void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster) if (tmp.size() != 2) surf_parse_error("Dragonfly topologies are defined by 3 levels with 2 elements each, and one with one element"); + unsigned int n_groups; try { - num_groups_ = std::stoi(tmp[0]); + n_groups = std::stoi(tmp[0]); } catch (const std::invalid_argument&) { throw std::invalid_argument(std::string("Invalid number of groups:") + tmp[0]); } + unsigned int n_blue; try { - num_links_blue_ = std::stoi(tmp[1]); + n_blue = std::stoi(tmp[1]); } catch (const std::invalid_argument&) { throw std::invalid_argument(std::string("Invalid number of links for the blue level:") + tmp[1]); } @@ -100,14 +102,16 @@ void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster) if (tmp.size() != 2) surf_parse_error("Dragonfly topologies are defined by 3 levels with 2 elements each, and one with one element"); + unsigned int n_chassis; try { - num_chassis_per_group_ = std::stoi(tmp[0]); + n_chassis = std::stoi(tmp[0]); } catch (const std::invalid_argument&) { - throw std::invalid_argument(std::string("Invalid number of groups:") + tmp[0]); + throw std::invalid_argument(std::string("Invalid number of chassis:") + tmp[0]); } + unsigned int n_black; try { - num_links_black_ = std::stoi(tmp[1]); + n_black = std::stoi(tmp[1]); } catch (const std::invalid_argument&) { throw std::invalid_argument(std::string("Invalid number of links for the black level:") + tmp[1]); } @@ -117,26 +121,28 @@ void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster) if (tmp.size() != 2) surf_parse_error("Dragonfly topologies are defined by 3 levels with 2 elements each, and one with one element"); + unsigned int n_routers; try { - num_blades_per_chassis_ = std::stoi(tmp[0]); + n_routers = std::stoi(tmp[0]); } catch (const std::invalid_argument&) { - throw std::invalid_argument(std::string("Invalid number of groups:") + tmp[0]); + throw std::invalid_argument(std::string("Invalid number of routers:") + tmp[0]); } + unsigned int n_green; try { - num_links_green_ = std::stoi(tmp[1]); + n_green = std::stoi(tmp[1]); } catch (const std::invalid_argument&) { throw std::invalid_argument(std::string("Invalid number of links for the green level:") + tmp[1]); } // The last part of topo_parameters should be the number of nodes per blade + unsigned int n_nodes; try { - num_nodes_per_blade_ = std::stoi(parameters[3]); + n_nodes = std::stoi(parameters[3]); } catch (const std::invalid_argument&) { throw std::invalid_argument(std::string("Last parameter is not the amount of nodes per blade:") + parameters[3]); } - - set_link_characteristics(cluster->bw, cluster->lat, cluster->sharing_policy); + return s4u::DragonflyParams({n_groups, n_blue}, {n_chassis, n_black}, {n_routers, n_green}, n_nodes); } /* Generate the cluster once every node is created */ diff --git a/src/kernel/routing/FatTreeZone.cpp b/src/kernel/routing/FatTreeZone.cpp index a848e8d0d8..5bda9635a9 100644 --- a/src/kernel/routing/FatTreeZone.cpp +++ b/src/kernel/routing/FatTreeZone.cpp @@ -404,7 +404,7 @@ void FatTreeZone::set_topology(unsigned int n_levels, const std::vector parameters; std::vector tmp; @@ -412,7 +412,7 @@ void FatTreeZone::parse_specific_arguments(ClusterCreationArgs* cluster) std::vector down; std::vector up; std::vector count; - boost::split(parameters, cluster->topo_parameters, boost::is_any_of(";")); + boost::split(parameters, topo_parameters, boost::is_any_of(";")); surf_parse_assert( parameters.size() == 4, @@ -464,12 +464,7 @@ void FatTreeZone::parse_specific_arguments(ClusterCreationArgs* cluster) throw std::invalid_argument(std::string("Invalid lower level port number:") + port); } } - - /* set topology */ - FatTreeZone::check_topology(n_lev, down, up, count); - set_topology(n_lev, down, up, count); - /* saving internal links properties */ - set_link_characteristics(cluster->bw, cluster->lat, cluster->sharing_policy); + return s4u::FatTreeParams(n_lev, down, up, count); } void FatTreeZone::generate_dot_file(const std::string& filename) const diff --git a/src/kernel/routing/TorusZone.cpp b/src/kernel/routing/TorusZone.cpp index a3f8c82cdb..f8bf90a35a 100644 --- a/src/kernel/routing/TorusZone.cpp +++ b/src/kernel/routing/TorusZone.cpp @@ -21,7 +21,7 @@ namespace simgrid { namespace kernel { namespace routing { -void TorusZone::create_links_for_node(ClusterCreationArgs* cluster, int id, int rank, unsigned int position) +void TorusZone::create_links_for_node(int id, int rank, unsigned int position) { /* Create all links that exist in the torus. Each rank creates @a dimensions-1 links */ int dim_product = 1; // Needed to calculate the next neighbor_id @@ -34,16 +34,15 @@ void TorusZone::create_links_for_node(ClusterCreationArgs* cluster, int id, int ? rank - (current_dimension - 1) * dim_product : rank + dim_product; // name of neighbor is not right for non contiguous cluster radicals (as id != rank in this case) - std::string link_id = - std::string(cluster->id) + "_link_from_" + std::to_string(id) + "_to_" + std::to_string(neighbor_rank_id); + std::string link_id = get_name() + "_link_from_" + std::to_string(id) + "_to_" + std::to_string(neighbor_rank_id); const s4u::Link* linkup; const s4u::Link* linkdown; - if (cluster->sharing_policy == s4u::Link::SharingPolicy::SPLITDUPLEX) { - linkup = create_link(link_id + "_UP", std::vector{cluster->bw})->set_latency(cluster->lat)->seal(); - linkdown = create_link(link_id + "_DOWN", std::vector{cluster->bw})->set_latency(cluster->lat)->seal(); + if (link_sharing_policy_ == s4u::Link::SharingPolicy::SPLITDUPLEX) { + linkup = create_link(link_id + "_UP", std::vector{link_bw_})->set_latency(link_lat_)->seal(); + linkdown = create_link(link_id + "_DOWN", std::vector{link_bw_})->set_latency(link_lat_)->seal(); } else { - linkup = create_link(link_id, std::vector{cluster->bw})->set_latency(cluster->lat)->seal(); + linkup = create_link(link_id, std::vector{link_bw_})->set_latency(link_lat_)->seal(); linkdown = linkup; } /* @@ -72,9 +71,11 @@ std::vector TorusZone::parse_topo_parameters(const std::string& to return dimensions; } -void TorusZone::parse_specific_arguments(ClusterCreationArgs* cluster) +void TorusZone::set_link_characteristics(double bw, double lat, s4u::Link::SharingPolicy sharing_policy) { - set_topology(TorusZone::parse_topo_parameters(cluster->topo_parameters)); + link_sharing_policy_ = sharing_policy; + link_bw_ = bw; + link_lat_ = lat; } void TorusZone::set_topology(const std::vector& dimensions) @@ -190,66 +191,6 @@ void TorusZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route->gw_dst = get_gateway(dst->id()); } -/** @brief Auxiliary function to create hosts */ -static std::pair -create_torus_host(const kernel::routing::ClusterCreationArgs* cluster, s4u::NetZone* zone, - const std::vector& /*coord*/, int id) -{ - std::string host_id = std::string(cluster->prefix) + std::to_string(id) + cluster->suffix; - XBT_DEBUG("TorusCluster: creating host=%s speed=%f", host_id.c_str(), cluster->speeds.front()); - const s4u::Host* host = zone->create_host(host_id, cluster->speeds) - ->set_core_count(cluster->core_amount) - ->set_properties(cluster->properties) - ->seal(); - return std::make_pair(host->get_netpoint(), nullptr); -} - -/** @brief Auxiliary function to create loopback links */ -static s4u::Link* create_torus_loopback(const kernel::routing::ClusterCreationArgs* cluster, s4u::NetZone* zone, - const std::vector& /*coord*/, int id) -{ - std::string link_id = std::string(cluster->id) + "_link_" + std::to_string(id) + "_loopback"; - XBT_DEBUG("TorusCluster: creating loopback link=%s bw=%f", link_id.c_str(), cluster->loopback_bw); - - s4u::Link* loopback = zone->create_link(link_id, cluster->loopback_bw) - ->set_sharing_policy(simgrid::s4u::Link::SharingPolicy::FATPIPE) - ->set_latency(cluster->loopback_lat) - ->seal(); - return loopback; -} - -/** @brief Auxiliary function to create limiter links */ -static s4u::Link* create_torus_limiter(const kernel::routing::ClusterCreationArgs* cluster, s4u::NetZone* zone, - const std::vector& /*coord*/, int id) -{ - std::string link_id = std::string(cluster->id) + "_link_" + std::to_string(id) + "_limiter"; - XBT_DEBUG("TorusCluster: creating limiter link=%s bw=%f", link_id.c_str(), cluster->limiter_link); - - s4u::Link* limiter = zone->create_link(link_id, cluster->limiter_link)->seal(); - return limiter; -} - -s4u::NetZone* create_torus_zone_with_hosts(const kernel::routing::ClusterCreationArgs* cluster, - const s4u::NetZone* parent) -{ - using namespace std::placeholders; - auto set_host = std::bind(create_torus_host, cluster, _1, _2, _3); - std::function set_loopback{}; - std::function set_limiter{}; - - if (cluster->loopback_bw > 0 || cluster->loopback_lat > 0) { - set_loopback = std::bind(create_torus_loopback, cluster, _1, _2, _3); - } - - if (cluster->limiter_link > 0) { - set_loopback = std::bind(create_torus_limiter, cluster, _1, _2, _3); - } - - return 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); -} - } // namespace routing } // namespace kernel @@ -276,18 +217,15 @@ NetZone* create_torus_zone(const std::string& name, const NetZone* parent, const if (parent) zone->set_parent(parent->get_impl()); + zone->set_link_characteristics(bandwidth, latency, sharing_policy); + for (int i = 0; i < tot_elements; i++) { kernel::routing::NetPoint* netpoint; Link* limiter; Link* loopback; zone->fill_leaf_from_cb(i, dimensions, set_netpoint, set_loopback, set_limiter, &netpoint, &loopback, &limiter); - kernel::routing::ClusterCreationArgs params; - params.id = name; - params.bw = bandwidth; - params.lat = latency; - params.sharing_policy = sharing_policy; - zone->create_links_for_node(¶ms, netpoint->id(), i, zone->node_pos_with_loopback_limiter(netpoint->id())); + zone->create_links_for_node(netpoint->id(), i, zone->node_pos_with_loopback_limiter(netpoint->id())); } return zone->get_iface(); diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 0be5d5243f..992fb55cd7 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -150,35 +150,105 @@ void sg_platf_new_disk(const simgrid::kernel::routing::DiskCreationArgs* disk) current_host->add_disk(new_disk); } -void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster) +/** @brief Auxiliary function to create hosts */ +static std::pair +sg_platf_cluster_create_host(const simgrid::kernel::routing::ClusterCreationArgs* cluster, simgrid::s4u::NetZone* zone, + const std::vector& /*coord*/, int id) { - using simgrid::kernel::routing::ClusterZone; + std::string host_id = std::string(cluster->prefix) + std::to_string(id) + cluster->suffix; + XBT_DEBUG("Cluster: creating host=%s speed=%f", host_id.c_str(), cluster->speeds.front()); + const simgrid::s4u::Host* host = zone->create_host(host_id, cluster->speeds) + ->set_core_count(cluster->core_amount) + ->set_properties(cluster->properties) + ->seal(); + return std::make_pair(host->get_netpoint(), nullptr); +} + +/** @brief Auxiliary function to create loopback links */ +static simgrid::s4u::Link* +sg_platf_cluster_create_loopback(const simgrid::kernel::routing::ClusterCreationArgs* cluster, + simgrid::s4u::NetZone* zone, const std::vector& /*coord*/, int id) +{ + std::string link_id = std::string(cluster->id) + "_link_" + std::to_string(id) + "_loopback"; + XBT_DEBUG("Cluster: creating loopback link=%s bw=%f", link_id.c_str(), cluster->loopback_bw); + + simgrid::s4u::Link* loopback = zone->create_link(link_id, cluster->loopback_bw) + ->set_sharing_policy(simgrid::s4u::Link::SharingPolicy::FATPIPE) + ->set_latency(cluster->loopback_lat) + ->seal(); + return loopback; +} + +/** @brief Auxiliary function to create limiter links */ +static simgrid::s4u::Link* sg_platf_cluster_create_limiter(const simgrid::kernel::routing::ClusterCreationArgs* cluster, + simgrid::s4u::NetZone* zone, + const std::vector& /*coord*/, int id) +{ + 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(); + return limiter; +} + +/** @brief Create Torus, Fat-Tree and Dragonfly clusters */ +static void sg_platf_new_cluster_hierarchical(const simgrid::kernel::routing::ClusterCreationArgs* cluster) +{ + using namespace std::placeholders; using simgrid::kernel::routing::DragonflyZone; using simgrid::kernel::routing::FatTreeZone; using simgrid::kernel::routing::TorusZone; - int rankId = 0; + auto set_host = std::bind(sg_platf_cluster_create_host, cluster, _1, _2, _3); + std::function set_loopback{}; + std::function set_limiter{}; - // What an inventive way of initializing the NetZone that I have as ancestor :-( - simgrid::kernel::routing::ZoneCreationArgs zone; - zone.id = cluster->id; + if (cluster->loopback_bw > 0 || cluster->loopback_lat > 0) { + set_loopback = std::bind(sg_platf_cluster_create_loopback, cluster, _1, _2, _3); + } + + if (cluster->limiter_link > 0) { + set_loopback = 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* zone; switch (cluster->topology) { case simgrid::kernel::routing::ClusterTopology::TORUS: - zone.routing = "ClusterTorus"; + 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); break; case simgrid::kernel::routing::ClusterTopology::DRAGONFLY: - zone.routing = "ClusterDragonfly"; + 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); break; case simgrid::kernel::routing::ClusterTopology::FAT_TREE: - zone.routing = "ClusterFatTree"; + 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); break; default: - zone.routing = "Cluster"; + THROW_IMPOSSIBLE; break; } + zone->seal(); +} + +/** @brief Create regular Cluster */ +static void sg_platf_new_cluster_flat(simgrid::kernel::routing::ClusterCreationArgs* cluster) +{ + using simgrid::kernel::routing::ClusterZone; + + int rankId = 0; + + // What an inventive way of initializing the NetZone that I have as ancestor :-( + simgrid::kernel::routing::ZoneCreationArgs zone; + zone.id = cluster->id; + zone.routing = "Cluster"; sg_platf_new_Zone_begin(&zone); auto* current_zone = static_cast(routing_get_current()); - current_zone->parse_specific_arguments(cluster); for (auto const& elm : cluster->properties) current_zone->get_iface()->set_property(elm.first, elm.second); @@ -237,11 +307,7 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster } // call the cluster function that adds the others links - if (cluster->topology == simgrid::kernel::routing::ClusterTopology::FAT_TREE) { - static_cast(current_zone)->add_processing_node(i, limiter, loopback); - } else { - current_zone->create_links_for_node(cluster, i, rankId, current_zone->node_pos_with_loopback_limiter(rankId)); - } + current_zone->create_links_for_node(cluster, i, rankId, current_zone->node_pos_with_loopback_limiter(rankId)); rankId++; } @@ -268,6 +334,20 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster XBT_DEBUG(""); sg_platf_new_Zone_seal(); +} + +void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster) +{ + switch (cluster->topology) { + case simgrid::kernel::routing::ClusterTopology::TORUS: + case simgrid::kernel::routing::ClusterTopology::DRAGONFLY: + case simgrid::kernel::routing::ClusterTopology::FAT_TREE: + sg_platf_new_cluster_hierarchical(cluster); + break; + default: + sg_platf_new_cluster_flat(cluster); + break; + } simgrid::kernel::routing::on_cluster_creation(*cluster); } diff --git a/teshsuite/simdag/flatifier/flatifier.tesh b/teshsuite/simdag/flatifier/flatifier.tesh index 3f8b607750..6de5246415 100644 --- a/teshsuite/simdag/flatifier/flatifier.tesh +++ b/teshsuite/simdag/flatifier/flatifier.tesh @@ -692,7 +692,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> > > > @@ -814,9 +813,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -853,9 +849,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -892,9 +885,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -931,9 +921,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -970,9 +957,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -1009,9 +993,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -1048,9 +1029,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -1087,9 +1065,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -1126,9 +1101,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -1165,9 +1137,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -1204,9 +1173,6 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> > > > @@ -1243,47 +1209,5 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo > > > -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> -> > > -- 2.20.1