Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cluster: use radicals from XML when creating resources
authorBruno Donassolo <bruno.donassolo@inria.fr>
Thu, 29 Apr 2021 14:41:14 +0000 (16:41 +0200)
committerBruno Donassolo <bruno.donassolo@inria.fr>
Thu, 29 Apr 2021 14:41:14 +0000 (16:41 +0200)
Use radicals from XML when creating hosts in sg_platf.xml.
Fix bug with limiter.
Add test.

src/surf/sg_platf.cpp
teshsuite/simdag/CMakeLists.txt
teshsuite/simdag/flatifier/flatifier.tesh
teshsuite/simdag/platforms/cluster_dragonfly_noncontiguous_rad.xml [new file with mode: 0644]
teshsuite/simdag/platforms/cluster_fat_tree_noncontiguous_rad.xml [new file with mode: 0644]
teshsuite/simdag/platforms/cluster_torus_noncontiguous_rad.xml [new file with mode: 0644]

index 24e7ab7..62b4c4d 100644 (file)
@@ -155,7 +155,12 @@ static std::pair<simgrid::kernel::routing::NetPoint*, simgrid::kernel::routing::
 sg_platf_cluster_create_host(const simgrid::kernel::routing::ClusterCreationArgs* cluster, simgrid::s4u::NetZone* zone,
                              const std::vector<unsigned int>& /*coord*/, int id)
 {
-  std::string host_id = std::string(cluster->prefix) + std::to_string(id) + cluster->suffix;
+  xbt_assert(static_cast<unsigned long>(id) < cluster->radicals.size(),
+             "Zone(%s): error when creating host number %d in the zone. Insufficient number of radicals available "
+             "(total = %lu). Check the 'radical' parameter in XML",
+             cluster->id.c_str(), id, cluster->radicals.size());
+
+  std::string host_id = std::string(cluster->prefix) + std::to_string(cluster->radicals[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)
@@ -169,7 +174,13 @@ static simgrid::s4u::Link*
 sg_platf_cluster_create_loopback(const simgrid::kernel::routing::ClusterCreationArgs* cluster,
                                  simgrid::s4u::NetZone* zone, const std::vector<unsigned int>& /*coord*/, int id)
 {
-  std::string link_id = std::string(cluster->id) + "_link_" + std::to_string(id) + "_loopback";
+  xbt_assert(static_cast<unsigned long>(id) < cluster->radicals.size(),
+             "Zone(%s): error when creating loopback for host number %d in the zone. Insufficient number of radicals "
+             "available "
+             "(total = %lu). 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]) + "_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)
@@ -184,7 +195,13 @@ static simgrid::s4u::Link* sg_platf_cluster_create_limiter(const simgrid::kernel
                                                            simgrid::s4u::NetZone* zone,
                                                            const std::vector<unsigned int>& /*coord*/, int id)
 {
-  std::string link_id = std::string(cluster->id) + "_link_" + std::to_string(id) + "_limiter";
+  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 = %lu). 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";
   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();
@@ -208,7 +225,7 @@ static void sg_platf_new_cluster_hierarchical(const simgrid::kernel::routing::Cl
   }
 
   if (cluster->limiter_link > 0) {
-    set_loopback = std::bind(sg_platf_cluster_create_limiter, cluster, _1, _2, _3);
+    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;
index 81c82e9..359be8d 100644 (file)
@@ -42,6 +42,9 @@ set(xml_files     ${xml_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/four_h
                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bogus_two_hosts_asymetric.xml
                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_one_link_splitduplex.xml
                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/two_hosts_one_link.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/cluster_torus_uncontiguos_rad.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/cluster_dragonfly_uncontiguos_rad.xml
+                                    ${CMAKE_CURRENT_SOURCE_DIR}/platforms/cluster_fat_tree_uncontiguos_rad.xml
                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/Dijkstra.xml                     PARENT_SCOPE)
 set(txt_files     ${txt_files}      ${CMAKE_CURRENT_SOURCE_DIR}/platforms/carol.fail
                                     ${CMAKE_CURRENT_SOURCE_DIR}/platforms/bob.trace
index 6de5246..7a4c631 100644 (file)
@@ -1211,3 +1211,274 @@ $ ${bindir:=.}/flatifier ${srcdir:=.}/examples/platforms/cluster_torus.xml "--lo
 >   </route>
 > </AS>
 > </platform>
+
+$ ${bindir:=.}/flatifier ../platforms/cluster_dragonfly_noncontiguous_rad.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+> <?xml version='1.0'?>
+> <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
+> <platform version="4">
+> <AS id="AS0" routing="Full">
+>   <host id="node-0.simgrid.org" speed="1000000000"/>
+>   <host id="node-1002.simgrid.org" speed="1000000000"/>
+>   <host id="node-1003.simgrid.org" speed="1000000000"/>
+>   <host id="node-1004.simgrid.org" speed="1000000000"/>
+>   <link id="__loopback__" bandwidth="10000000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="black_link_in_group_0_between_chassis_0_and_1_blade_0_6_DOWN" bandwidth="375000000" latency="0.000050000"/>
+>   <link id="black_link_in_group_0_between_chassis_0_and_1_blade_0_6_UP" bandwidth="375000000" latency="0.000050000"/>
+>   <link id="black_link_in_group_0_between_chassis_0_and_1_blade_1_7_DOWN" bandwidth="375000000" latency="0.000050000"/>
+>   <link id="black_link_in_group_0_between_chassis_0_and_1_blade_1_7_UP" bandwidth="375000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_0_limiter" bandwidth="150000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_0_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_1002_limiter" bandwidth="150000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_1002_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_1003_limiter" bandwidth="150000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_1003_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_1004_limiter" bandwidth="150000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_1004_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="green_link_in_chassis_0_between_routers_0_and_1_4_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="green_link_in_chassis_0_between_routers_0_and_1_4_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="green_link_in_chassis_1_between_routers_0_and_1_5_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="green_link_in_chassis_1_between_routers_0_and_1_5_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="local_link_from_router_0_to_node_0_0_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="local_link_from_router_0_to_node_0_0_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="local_link_from_router_1_to_node_0_1_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="local_link_from_router_1_to_node_0_1_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="local_link_from_router_2_to_node_0_2_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="local_link_from_router_2_to_node_0_2_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="local_link_from_router_3_to_node_0_3_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="local_link_from_router_3_to_node_0_3_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <route src="node-0.simgrid.org" dst="node-0.simgrid.org">
+>   <link_ctn id="bob_cluster_link_0_loopback"/>
+>   </route>
+>   <route src="node-0.simgrid.org" dst="node-1002.simgrid.org">
+>   <link_ctn id="local_link_from_router_0_to_node_0_0_UP"/><link_ctn id="bob_cluster_link_0_limiter"/><link_ctn id="green_link_in_chassis_0_between_routers_0_and_1_4_UP"/><link_ctn id="bob_cluster_link_1002_limiter"/><link_ctn id="local_link_from_router_1_to_node_0_1_DOWN"/>
+>   </route>
+>   <route src="node-0.simgrid.org" dst="node-1003.simgrid.org">
+>   <link_ctn id="local_link_from_router_0_to_node_0_0_UP"/><link_ctn id="bob_cluster_link_0_limiter"/><link_ctn id="black_link_in_group_0_between_chassis_0_and_1_blade_0_6_UP"/><link_ctn id="bob_cluster_link_1003_limiter"/><link_ctn id="local_link_from_router_2_to_node_0_2_DOWN"/>
+>   </route>
+>   <route src="node-0.simgrid.org" dst="node-1004.simgrid.org">
+>   <link_ctn id="local_link_from_router_0_to_node_0_0_UP"/><link_ctn id="bob_cluster_link_0_limiter"/><link_ctn id="green_link_in_chassis_0_between_routers_0_and_1_4_UP"/><link_ctn id="black_link_in_group_0_between_chassis_0_and_1_blade_1_7_UP"/><link_ctn id="bob_cluster_link_1004_limiter"/><link_ctn id="local_link_from_router_3_to_node_0_3_DOWN"/>
+>   </route>
+>   <route src="node-1002.simgrid.org" dst="node-0.simgrid.org">
+>   <link_ctn id="local_link_from_router_1_to_node_0_1_UP"/><link_ctn id="bob_cluster_link_1002_limiter"/><link_ctn id="green_link_in_chassis_0_between_routers_0_and_1_4_DOWN"/><link_ctn id="bob_cluster_link_0_limiter"/><link_ctn id="local_link_from_router_0_to_node_0_0_DOWN"/>
+>   </route>
+>   <route src="node-1002.simgrid.org" dst="node-1002.simgrid.org">
+>   <link_ctn id="bob_cluster_link_1002_loopback"/>
+>   </route>
+>   <route src="node-1002.simgrid.org" dst="node-1003.simgrid.org">
+>   <link_ctn id="local_link_from_router_1_to_node_0_1_UP"/><link_ctn id="bob_cluster_link_1002_limiter"/><link_ctn id="green_link_in_chassis_0_between_routers_0_and_1_4_DOWN"/><link_ctn id="black_link_in_group_0_between_chassis_0_and_1_blade_0_6_UP"/><link_ctn id="bob_cluster_link_1003_limiter"/><link_ctn id="local_link_from_router_2_to_node_0_2_DOWN"/>
+>   </route>
+>   <route src="node-1002.simgrid.org" dst="node-1004.simgrid.org">
+>   <link_ctn id="local_link_from_router_1_to_node_0_1_UP"/><link_ctn id="bob_cluster_link_1002_limiter"/><link_ctn id="black_link_in_group_0_between_chassis_0_and_1_blade_1_7_UP"/><link_ctn id="bob_cluster_link_1004_limiter"/><link_ctn id="local_link_from_router_3_to_node_0_3_DOWN"/>
+>   </route>
+>   <route src="node-1003.simgrid.org" dst="node-0.simgrid.org">
+>   <link_ctn id="local_link_from_router_2_to_node_0_2_UP"/><link_ctn id="bob_cluster_link_1003_limiter"/><link_ctn id="black_link_in_group_0_between_chassis_0_and_1_blade_0_6_DOWN"/><link_ctn id="bob_cluster_link_0_limiter"/><link_ctn id="local_link_from_router_0_to_node_0_0_DOWN"/>
+>   </route>
+>   <route src="node-1003.simgrid.org" dst="node-1002.simgrid.org">
+>   <link_ctn id="local_link_from_router_2_to_node_0_2_UP"/><link_ctn id="bob_cluster_link_1003_limiter"/><link_ctn id="green_link_in_chassis_1_between_routers_0_and_1_5_UP"/><link_ctn id="bob_cluster_link_1002_limiter"/><link_ctn id="local_link_from_router_1_to_node_0_1_DOWN"/>
+>   </route>
+>   <route src="node-1003.simgrid.org" dst="node-1003.simgrid.org">
+>   <link_ctn id="bob_cluster_link_1003_loopback"/>
+>   </route>
+>   <route src="node-1003.simgrid.org" dst="node-1004.simgrid.org">
+>   <link_ctn id="local_link_from_router_2_to_node_0_2_UP"/><link_ctn id="bob_cluster_link_1003_limiter"/><link_ctn id="green_link_in_chassis_1_between_routers_0_and_1_5_UP"/><link_ctn id="black_link_in_group_0_between_chassis_0_and_1_blade_1_7_UP"/><link_ctn id="bob_cluster_link_1004_limiter"/><link_ctn id="local_link_from_router_3_to_node_0_3_DOWN"/>
+>   </route>
+>   <route src="node-1004.simgrid.org" dst="node-0.simgrid.org">
+>   <link_ctn id="local_link_from_router_3_to_node_0_3_UP"/><link_ctn id="bob_cluster_link_1004_limiter"/><link_ctn id="green_link_in_chassis_1_between_routers_0_and_1_5_DOWN"/><link_ctn id="bob_cluster_link_0_limiter"/><link_ctn id="local_link_from_router_0_to_node_0_0_DOWN"/>
+>   </route>
+>   <route src="node-1004.simgrid.org" dst="node-1002.simgrid.org">
+>   <link_ctn id="local_link_from_router_3_to_node_0_3_UP"/><link_ctn id="bob_cluster_link_1004_limiter"/><link_ctn id="black_link_in_group_0_between_chassis_0_and_1_blade_1_7_DOWN"/><link_ctn id="bob_cluster_link_1002_limiter"/><link_ctn id="local_link_from_router_1_to_node_0_1_DOWN"/>
+>   </route>
+>   <route src="node-1004.simgrid.org" dst="node-1003.simgrid.org">
+>   <link_ctn id="local_link_from_router_3_to_node_0_3_UP"/><link_ctn id="bob_cluster_link_1004_limiter"/><link_ctn id="green_link_in_chassis_1_between_routers_0_and_1_5_DOWN"/><link_ctn id="black_link_in_group_0_between_chassis_0_and_1_blade_0_6_UP"/><link_ctn id="bob_cluster_link_1003_limiter"/><link_ctn id="local_link_from_router_2_to_node_0_2_DOWN"/>
+>   </route>
+>   <route src="node-1004.simgrid.org" dst="node-1004.simgrid.org">
+>   <link_ctn id="bob_cluster_link_1004_loopback"/>
+>   </route>
+> </AS>
+> </platform>
+
+$ ${bindir:=.}/flatifier ../platforms/cluster_fat_tree_noncontiguous_rad.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+> <?xml version='1.0'?>
+> <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
+> <platform version="4">
+> <AS id="AS0" routing="Full">
+>   <host id="node-100.simgrid.org" speed="1000000000"/>
+>   <host id="node-101.simgrid.org" speed="1000000000"/>
+>   <host id="node-119.simgrid.org" speed="1000000000"/>
+>   <host id="node-120.simgrid.org" speed="1000000000"/>
+>   <link id="__loopback__" bandwidth="10000000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_100_limiter" bandwidth="50000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_100_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_101_limiter" bandwidth="50000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_101_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_119_limiter" bandwidth="50000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_119_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_120_limiter" bandwidth="50000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_120_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="link_from_-1_-3_4_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-1_-3_4_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-1_-3_5_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-1_-3_5_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-1_-4_6_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-1_-4_6_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-1_-4_7_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-1_-4_7_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-2_-3_8_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-2_-3_8_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-2_-3_9_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-2_-3_9_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-2_-4_10_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-2_-4_10_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-2_-4_11_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_-2_-4_11_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_0_-1_0_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_0_-1_0_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_1_-1_1_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_1_-1_1_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_2_-2_2_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_2_-2_2_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_3_-2_3_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="link_from_3_-2_3_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <route src="node-100.simgrid.org" dst="node-100.simgrid.org">
+>   <link_ctn id="bob_cluster_link_100_loopback"/>
+>   </route>
+>   <route src="node-100.simgrid.org" dst="node-101.simgrid.org">
+>   <link_ctn id="link_from_0_-1_0_UP"/><link_ctn id="bob_cluster_link_100_limiter"/><link_ctn id="link_from_1_-1_1_DOWN"/><link_ctn id="bob_cluster_link_101_limiter"/>
+>   </route>
+>   <route src="node-100.simgrid.org" dst="node-119.simgrid.org">
+>   <link_ctn id="link_from_0_-1_0_UP"/><link_ctn id="bob_cluster_link_100_limiter"/><link_ctn id="link_from_-1_-3_4_UP"/><link_ctn id="link_from_-2_-3_8_DOWN"/><link_ctn id="link_from_2_-2_2_DOWN"/><link_ctn id="bob_cluster_link_119_limiter"/>
+>   </route>
+>   <route src="node-100.simgrid.org" dst="node-120.simgrid.org">
+>   <link_ctn id="link_from_0_-1_0_UP"/><link_ctn id="bob_cluster_link_100_limiter"/><link_ctn id="link_from_-1_-4_6_UP"/><link_ctn id="link_from_-2_-4_10_DOWN"/><link_ctn id="link_from_3_-2_3_DOWN"/><link_ctn id="bob_cluster_link_120_limiter"/>
+>   </route>
+>   <route src="node-101.simgrid.org" dst="node-100.simgrid.org">
+>   <link_ctn id="link_from_1_-1_1_UP"/><link_ctn id="bob_cluster_link_101_limiter"/><link_ctn id="link_from_0_-1_0_DOWN"/><link_ctn id="bob_cluster_link_100_limiter"/>
+>   </route>
+>   <route src="node-101.simgrid.org" dst="node-101.simgrid.org">
+>   <link_ctn id="bob_cluster_link_101_loopback"/>
+>   </route>
+>   <route src="node-101.simgrid.org" dst="node-119.simgrid.org">
+>   <link_ctn id="link_from_1_-1_1_UP"/><link_ctn id="bob_cluster_link_101_limiter"/><link_ctn id="link_from_-1_-3_4_UP"/><link_ctn id="link_from_-2_-3_8_DOWN"/><link_ctn id="link_from_2_-2_2_DOWN"/><link_ctn id="bob_cluster_link_119_limiter"/>
+>   </route>
+>   <route src="node-101.simgrid.org" dst="node-120.simgrid.org">
+>   <link_ctn id="link_from_1_-1_1_UP"/><link_ctn id="bob_cluster_link_101_limiter"/><link_ctn id="link_from_-1_-4_6_UP"/><link_ctn id="link_from_-2_-4_10_DOWN"/><link_ctn id="link_from_3_-2_3_DOWN"/><link_ctn id="bob_cluster_link_120_limiter"/>
+>   </route>
+>   <route src="node-119.simgrid.org" dst="node-100.simgrid.org">
+>   <link_ctn id="link_from_2_-2_2_UP"/><link_ctn id="bob_cluster_link_119_limiter"/><link_ctn id="link_from_-2_-3_8_UP"/><link_ctn id="link_from_-1_-3_4_DOWN"/><link_ctn id="link_from_0_-1_0_DOWN"/><link_ctn id="bob_cluster_link_100_limiter"/>
+>   </route>
+>   <route src="node-119.simgrid.org" dst="node-101.simgrid.org">
+>   <link_ctn id="link_from_2_-2_2_UP"/><link_ctn id="bob_cluster_link_119_limiter"/><link_ctn id="link_from_-2_-4_10_UP"/><link_ctn id="link_from_-1_-4_6_DOWN"/><link_ctn id="link_from_1_-1_1_DOWN"/><link_ctn id="bob_cluster_link_101_limiter"/>
+>   </route>
+>   <route src="node-119.simgrid.org" dst="node-119.simgrid.org">
+>   <link_ctn id="bob_cluster_link_119_loopback"/>
+>   </route>
+>   <route src="node-119.simgrid.org" dst="node-120.simgrid.org">
+>   <link_ctn id="link_from_2_-2_2_UP"/><link_ctn id="bob_cluster_link_119_limiter"/><link_ctn id="link_from_3_-2_3_DOWN"/><link_ctn id="bob_cluster_link_120_limiter"/>
+>   </route>
+>   <route src="node-120.simgrid.org" dst="node-100.simgrid.org">
+>   <link_ctn id="link_from_3_-2_3_UP"/><link_ctn id="bob_cluster_link_120_limiter"/><link_ctn id="link_from_-2_-3_8_UP"/><link_ctn id="link_from_-1_-3_4_DOWN"/><link_ctn id="link_from_0_-1_0_DOWN"/><link_ctn id="bob_cluster_link_100_limiter"/>
+>   </route>
+>   <route src="node-120.simgrid.org" dst="node-101.simgrid.org">
+>   <link_ctn id="link_from_3_-2_3_UP"/><link_ctn id="bob_cluster_link_120_limiter"/><link_ctn id="link_from_-2_-4_10_UP"/><link_ctn id="link_from_-1_-4_6_DOWN"/><link_ctn id="link_from_1_-1_1_DOWN"/><link_ctn id="bob_cluster_link_101_limiter"/>
+>   </route>
+>   <route src="node-120.simgrid.org" dst="node-119.simgrid.org">
+>   <link_ctn id="link_from_3_-2_3_UP"/><link_ctn id="bob_cluster_link_120_limiter"/><link_ctn id="link_from_2_-2_2_DOWN"/><link_ctn id="bob_cluster_link_119_limiter"/>
+>   </route>
+>   <route src="node-120.simgrid.org" dst="node-120.simgrid.org">
+>   <link_ctn id="bob_cluster_link_120_loopback"/>
+>   </route>
+> </AS>
+> </platform>
+
+$ ${bindir:=.}/flatifier ../platforms/cluster_torus_noncontiguous_rad.xml "--log=root.fmt:[%10.6r]%e[%i:%a@%h]%e%m%n"
+> <?xml version='1.0'?>
+> <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
+> <platform version="4">
+> <AS id="AS0" routing="Full">
+>   <host id="node-0.simgrid.org" speed="1000000000"/>
+>   <host id="node-1.simgrid.org" speed="1000000000"/>
+>   <host id="node-102.simgrid.org" speed="1000000000"/>
+>   <host id="node-103.simgrid.org" speed="1000000000"/>
+>   <link id="__loopback__" bandwidth="10000000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_0_limiter" bandwidth="50000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_0_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_102_limiter" bandwidth="50000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_102_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_103_limiter" bandwidth="50000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_103_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_1_limiter" bandwidth="50000000" latency="0.000000000"/>
+>   <link id="bob_cluster_link_1_loopback" bandwidth="100000000" latency="0.000000000" sharing_policy="FATPIPE"/>
+>   <link id="bob_cluster_link_from_0_to_0_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_0_to_0_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_0_to_1_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_0_to_1_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_0_to_2_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_0_to_2_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_1_to_0_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_1_to_0_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_1_to_1_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_1_to_1_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_1_to_3_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_1_to_3_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_2_to_0_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_2_to_0_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_2_to_2_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_2_to_2_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_2_to_3_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_2_to_3_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_3_to_1_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_3_to_1_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_3_to_2_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_3_to_2_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_3_to_3_DOWN" bandwidth="125000000" latency="0.000050000"/>
+>   <link id="bob_cluster_link_from_3_to_3_UP" bandwidth="125000000" latency="0.000050000"/>
+>   <route src="node-0.simgrid.org" dst="node-0.simgrid.org">
+>   <link_ctn id="bob_cluster_link_0_loopback"/>
+>   </route>
+>   <route src="node-0.simgrid.org" dst="node-1.simgrid.org">
+>   <link_ctn id="bob_cluster_link_0_limiter"/><link_ctn id="bob_cluster_link_from_0_to_1_UP"/>
+>   </route>
+>   <route src="node-0.simgrid.org" dst="node-102.simgrid.org">
+>   <link_ctn id="bob_cluster_link_0_limiter"/><link_ctn id="bob_cluster_link_from_0_to_2_UP"/>
+>   </route>
+>   <route src="node-0.simgrid.org" dst="node-103.simgrid.org">
+>   <link_ctn id="bob_cluster_link_0_limiter"/><link_ctn id="bob_cluster_link_from_0_to_1_UP"/><link_ctn id="bob_cluster_link_1_limiter"/><link_ctn id="bob_cluster_link_from_1_to_3_UP"/>
+>   </route>
+>   <route src="node-1.simgrid.org" dst="node-0.simgrid.org">
+>   <link_ctn id="bob_cluster_link_1_limiter"/><link_ctn id="bob_cluster_link_from_0_to_1_DOWN"/>
+>   </route>
+>   <route src="node-1.simgrid.org" dst="node-1.simgrid.org">
+>   <link_ctn id="bob_cluster_link_1_loopback"/>
+>   </route>
+>   <route src="node-1.simgrid.org" dst="node-102.simgrid.org">
+>   <link_ctn id="bob_cluster_link_1_limiter"/><link_ctn id="bob_cluster_link_from_0_to_1_DOWN"/><link_ctn id="bob_cluster_link_0_limiter"/><link_ctn id="bob_cluster_link_from_0_to_2_UP"/>
+>   </route>
+>   <route src="node-1.simgrid.org" dst="node-103.simgrid.org">
+>   <link_ctn id="bob_cluster_link_1_limiter"/><link_ctn id="bob_cluster_link_from_1_to_3_UP"/>
+>   </route>
+>   <route src="node-102.simgrid.org" dst="node-0.simgrid.org">
+>   <link_ctn id="bob_cluster_link_102_limiter"/><link_ctn id="bob_cluster_link_from_0_to_2_DOWN"/>
+>   </route>
+>   <route src="node-102.simgrid.org" dst="node-1.simgrid.org">
+>   <link_ctn id="bob_cluster_link_102_limiter"/><link_ctn id="bob_cluster_link_from_2_to_3_UP"/><link_ctn id="bob_cluster_link_103_limiter"/><link_ctn id="bob_cluster_link_from_1_to_3_DOWN"/>
+>   </route>
+>   <route src="node-102.simgrid.org" dst="node-102.simgrid.org">
+>   <link_ctn id="bob_cluster_link_102_loopback"/>
+>   </route>
+>   <route src="node-102.simgrid.org" dst="node-103.simgrid.org">
+>   <link_ctn id="bob_cluster_link_102_limiter"/><link_ctn id="bob_cluster_link_from_2_to_3_UP"/>
+>   </route>
+>   <route src="node-103.simgrid.org" dst="node-0.simgrid.org">
+>   <link_ctn id="bob_cluster_link_103_limiter"/><link_ctn id="bob_cluster_link_from_2_to_3_DOWN"/><link_ctn id="bob_cluster_link_102_limiter"/><link_ctn id="bob_cluster_link_from_0_to_2_DOWN"/>
+>   </route>
+>   <route src="node-103.simgrid.org" dst="node-1.simgrid.org">
+>   <link_ctn id="bob_cluster_link_103_limiter"/><link_ctn id="bob_cluster_link_from_1_to_3_DOWN"/>
+>   </route>
+>   <route src="node-103.simgrid.org" dst="node-102.simgrid.org">
+>   <link_ctn id="bob_cluster_link_103_limiter"/><link_ctn id="bob_cluster_link_from_2_to_3_DOWN"/>
+>   </route>
+>   <route src="node-103.simgrid.org" dst="node-103.simgrid.org">
+>   <link_ctn id="bob_cluster_link_103_loopback"/>
+>   </route>
+> </AS>
+> </platform>
diff --git a/teshsuite/simdag/platforms/cluster_dragonfly_noncontiguous_rad.xml b/teshsuite/simdag/platforms/cluster_dragonfly_noncontiguous_rad.xml
new file mode 100644 (file)
index 0000000..908ecf8
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
+<platform version="4.1">
+  <zone id="world" routing="Full">
+    <cluster id="bob_cluster" topology="DRAGONFLY" topo_parameters="1,4;2,3;2,1;1"
+             prefix="node-" radical="0,1002-1004" suffix=".simgrid.org"
+            speed="1Gf" bw="125MBps" lat="50us"
+             loopback_bw="100MBps" loopback_lat="0" limiter_link="150MBps"/>
+  </zone>
+</platform>
diff --git a/teshsuite/simdag/platforms/cluster_fat_tree_noncontiguous_rad.xml b/teshsuite/simdag/platforms/cluster_fat_tree_noncontiguous_rad.xml
new file mode 100644 (file)
index 0000000..b356f3f
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
+<platform version="4.1">
+  <!-- This is an example for a fat tree cluster. 
+  This is taken from figure 1/ b/ of the paper "D-Mod-K Routing Providing on-Blocking Traffic for Shift Permutations on 
+  Real Life Fat Trees" available at http://webee.eedev.technion.ac.il/wp-content/uploads/2014/08/publication_574.pdf
+  This defines a two levels fat-tree, with 4 leaf switches connected to 4 nodes each and 2 core switches connected to 
+  each leaf switch by two cables -->
+
+  <zone id="world" routing="Full">
+    <cluster id="bob_cluster"
+            prefix="node-" radical="100-101,119-120" suffix=".simgrid.org"
+            speed="1Gf" bw="125MBps" lat="50us" 
+             topology="FAT_TREE" topo_parameters="2;2,2;1,2;1,2"
+            loopback_bw="100MBps" loopback_lat="0" limiter_link="50MBps" />
+  </zone>
+</platform>
diff --git a/teshsuite/simdag/platforms/cluster_torus_noncontiguous_rad.xml b/teshsuite/simdag/platforms/cluster_torus_noncontiguous_rad.xml
new file mode 100644 (file)
index 0000000..c97b9d1
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
+<platform version="4.1">
+  <zone id="world" routing="Full">
+    <cluster id="bob_cluster" topology="TORUS" topo_parameters="1,2,2"
+            prefix="node-" radical="0-1,102-103" suffix=".simgrid.org"
+            speed="1Gf" bw="125MBps" lat="50us"
+            loopback_bw="100MBps" loopback_lat="0" limiter_link="50MBps"/>
+  </zone>
+</platform>