<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
<platform version="3">
- <process host="a" function="master">
+ <process host="Tremblay" function="master">
<argument value="100"/>
- <argument value="c"/>
+ <argument value="Jupiter"/>
<argument value="1"/>
</process>
- <process host="c" function="slave">
+ <process host="Jupiter" function="slave">
<argument value="1"/>
</process>
-
+
</platform>
+++ /dev/null
-<?xml version='1.0'?>
- <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
-<platform version="3">
-
- <!-- a ______1______ b _____2_____ c -->
-
- <AS id="AS0" routing="Full">
-
- <host id="a" power="1Gf" />
- <host id="b" power="1Gf" />
- <host id="c" power="1Gf" />
-
- <link id="1" bandwidth="1kBps" latency="10ms" />
- <link id="2" bandwidth="1kBps" latency="10ms" />
-
- <route src="a" dst="b">
- <link_ctn id="1" />
- </route>
-
- <route src="b" dst="c">
- <link_ctn id="2" />
- </route>
-
- <route src="a" dst="c">
- <link_ctn id="1" />
- <link_ctn id="2" />
- </route>
-
- </AS>
-</platform>
\ No newline at end of file
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
<platform version="3">
- <process host="S1" function="master">
+ <process host="Tremblay" function="master">
<argument value="100000"/>
- <argument value="C1"/>
+ <argument value="Jupiter"/>
<argument value="1"/>
</process>
- <process host="C1" function="slave">
+ <process host="Jupiter" function="slave">
<argument value="1"/>
</process>
- <process host="S2" function="master">
+ <process host="Fafard" function="master">
<argument value="1000000"/>
- <argument value="C2"/>
+ <argument value="Ginette"/>
<argument value="2"/>
</process>
-
- <process host="C2" function="slave">
+
+ <process host="Ginette" function="slave">
<argument value="2"/>
</process>
-
- <process host="S3" function="master">
+ <process host="Bourassa" function="master">
<argument value="2000000"/>
- <argument value="C3"/>
+ <argument value="Lovelace"/>
<argument value="3"/>
</process>
-
- <process host="C3" function="slave">
+
+ <process host="Lovelace" function="slave">
<argument value="3"/>
</process>
- <process host="S3" function="master" start_time="2.0">
+ <process host="Bourassa" function="master" start_time="2.0">
<argument value="2000000"/>
- <argument value="C3"/>
+ <argument value="Lovelace"/>
<argument value="4"/>
</process>
-
- <process host="C3" function="slave">
+
+ <process host="Lovelace" function="slave">
<argument value="4"/>
</process>
- <process host="C3" function="timer">
+ <process host="Lovelace" function="timer">
<argument value="0"/>
<argument value=".1"/>
</process>
- <process host="C3" function="timer" start_time="2.0">
+ <process host="Lovelace" function="timer" start_time="2.0">
<argument value="0"/>
<argument value=".1"/>
</process>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
<platform version="3">
- <process host="S1" function="master">
+ <process host="Tremblay" function="master">
<argument value="100000"/>
- <argument value="C1"/>
+ <argument value="Jupiter"/>
<argument value="1"/>
</process>
-
- <process host="C1" function="slave">
+ <process host="Jupiter" function="slave">
<argument value="1"/>
</process>
- <process host="S2" function="master">
+ <process host="Fafard" function="master">
<argument value="1000000"/>
- <argument value="C2"/>
+ <argument value="Ginette"/>
<argument value="2"/>
</process>
-
- <process host="C2" function="slave">
+ <process host="Ginette" function="slave">
<argument value="2"/>
</process>
-
- <process host="S3" function="master">
+ <process host="Bourassa" function="master">
<argument value="2000000"/>
- <argument value="C3"/>
+ <argument value="Lovelace"/>
<argument value="3"/>
</process>
-
- <process host="C3" function="slave">
+ <process host="Lovelace" function="slave">
<argument value="3"/>
</process>
-
-<!-- <process host="C3" function="timer">
- <argument value="0"/>
- <argument value=".1"/>
- </process>
- -->
</platform>
+++ /dev/null
-<?xml version='1.0'?>
- <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
- <platform version="3">
- <!--
-
- S1 ______1______ C1
-
- S2 _______2_____ C2
-
- S3 ________3____ C3
-
- -->
-
- <AS id="AS0" routing="Full">
- <host id="S1" power="1Gf"/>
- <host id="C1" power="1Gf"/>
- <host id="S2" power="1Gf"/>
- <host id="C2" power="1Gf"/>
- <host id="S3" power="1Gf"/>
- <host id="C3" power="1Gf"/>
-
- <link id="1" bandwidth="1MBps" latency="10us"/>
- <link id="2" bandwidth="1MBps" latency="10us"/>
- <link id="3" bandwidth="1MBps" latency="10us"/>
-
- <route src="S1" dst="C1">
- <link_ctn id="1"/>
- </route>
- <route src="S2" dst="C2">
- <link_ctn id="2"/>
- </route>
- <route src="S3" dst="C3">
- <link_ctn id="3"/>
- </route>
-
- </AS>
- </platform>
+++ /dev/null
-<?xml version='1.0'?>
- <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
- <platform version="3">
- <AS id="AS0" routing="Full">
- <!--- dogbone
- -->
-
-
- <host id="S1" power="1Gf"/>
- <host id="C1" power="1Gf"/>
- <host id="S2" power="1Gf"/>
- <host id="C2" power="1Gf"/>
- <router id="R1"/>
- <router id="R2"/>
-
- <link id="1" bandwidth="100MBps" latency="10us"/>
- <link id="2" bandwidth="10MBps" latency="10us"/>
- <link id="3" bandwidth="100MBps" latency="10us"/>
- <link id="4" bandwidth="100MBps" latency="10us"/>
- <link id="5" bandwidth="100MBps" latency="10us"/>
-
-
- <route src="S1" dst="C1">
- <link_ctn id="1"/>
- <link_ctn id="2"/>
- <link_ctn id="3"/>
- </route>
-
- <route src="S2" dst="C2">
- <link_ctn id="4"/>
- <link_ctn id="2"/>
- <link_ctn id="5"/>
- </route>
-
- <route src="S1" dst="C2">
- <link_ctn id="1"/>
- <link_ctn id="2"/>
- <link_ctn id="5"/>
- </route>
-
- <route src="S2" dst="C1">
- <link_ctn id="4"/>
- <link_ctn id="2"/>
- <link_ctn id="3"/>
- </route>
-
- <route src="S1" dst="R1">
- <link_ctn id="1"/>
- </route>
-
- <route src="R1" dst="R2">
- <link_ctn id="2"/>
- </route>
-
- <route src="R2" dst="C1">
- <link_ctn id="3"/>
- </route>
-
- <route src="S2" dst="R1">
- <link_ctn id="4"/>
- </route>
-
- <route src="R2" dst="C2">
- <link_ctn id="5"/>
- </route>
- </AS>
- </platform>
p 3hosts 2links
-$ ns3/ns3 ${srcdir:=.}/examples/msg/ns3/3hosts_2links_p.xml ${srcdir:=.}/examples/msg/ns3/3hosts_2links_d.xml --cfg=network/model:NS3
+$ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3hosts_2links_d.xml --cfg=network/model:NS3
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
-> [c:slave:(2) 0.700000] [msg_test/INFO] FLOW[1] : Receive 100 bytes from a to c
+> [Jupiter:slave:(2) 0.000249] [msg_test/INFO] FLOW[1] : Receive 100 bytes from Tremblay to Jupiter
p 6hosts 3links
-$ ns3/ns3 ${srcdir:=.}/examples/msg/ns3/3links-p.xml ${srcdir:=.}/examples/msg/ns3/3links-d.xml --cfg=network/model:NS3
+$ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3links-d.xml --cfg=network/model:NS3
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
-> [C1:slave:(2) 0.104428] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from S1 to C1
-> [C2:slave:(4) 1.041346] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from S2 to C2
-> [C3:slave:(6) 2.082380] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from S3 to C3
+> [Jupiter:slave:(2) 0.003027] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from Tremblay to Jupiter
+> [Ginette:slave:(4) 0.161074] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from Fafard to Ginette
+> [Lovelace:slave:(6) 1.256527] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from Bourassa to Lovelace
-$ ns3/ns3 ${srcdir:=.}/examples/msg/ns3/3links-p.xml ${srcdir:=.}/examples/msg/ns3/3links-d-timer.xml --cfg=network/model:NS3
+$ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3links-d-timer.xml --cfg=network/model:NS3
> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
> [0.000000] [surf_config/INFO] Switching workstation model to compound since you changed the network and/or cpu model(s)
-> [C1:slave:(2) 0.104428] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from S1 to C1
-> [C2:slave:(4) 1.041346] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from S2 to C2
-> [C3:slave:(6) 2.082422] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from S3 to C3
-> [C3:slave:(7) 4.164594] [msg_test/INFO] FLOW[4] : Receive 2000000 bytes from S3 to C3
+> [Jupiter:slave:(2) 0.003027] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from Tremblay to Jupiter
+> [Ginette:slave:(4) 0.161074] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from Fafard to Ginette
+> [Lovelace:slave:(6) 1.256527] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from Bourassa to Lovelace
+> [Lovelace:slave:(7) 3.256527] [msg_test/INFO] FLOW[4] : Receive 2000000 bytes from Bourassa to Lovelace
p One cluster
--- /dev/null
+<?xml version='1.0'?>
+ <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+ <platform version="3">
+ <AS id="AS0" routing="Full">
+
+ <host id="Tremblay" power="98.095Mf"/>
+ <host id="Jupiter" power="76.296Mf"/>
+ <host id="Fafard" power="76.296Mf"/>
+ <host id="Ginette" power="48.492Mf"/>
+ <host id="Bourassa" power="48.492Mf"/>
+ <host id="Lovelace" power="30.343Mf"/>
+
+ <link id="0" bandwidth="41.279125MBps" latency="59.904us"/>
+ <link id="1" bandwidth="34.285625MBps" latency="514.433us"/>
+ <link id="2" bandwidth="118.6825MBps" latency="136.931us"/>
+ <link id="3" bandwidth="34.285625MBps" latency="514.433us"/>
+ <link id="4" bandwidth="10.099625MBps" latency="479.78us"/>
+ <link id="5" bandwidth="27.94625MBps" latency="278.066us"/>
+ <link id="6" bandwidth="41.279125MBps" latency="59.904us"/>
+ <link id="7" bandwidth="11.618875MBps" latency="189.98us"/>
+ <link id="8" bandwidth="8.158MBps" latency="270.544us"/>
+ <link id="9" bandwidth="7.20975MBps" latency="1.461517ms"/>
+ <link id="10" bandwidth="4.67975MBps" latency="848.712us"/>
+ <link id="11" bandwidth="252.75kBps" latency="5.70455ms"/>
+ <link id="12" bandwidth="1.792625MBps" latency="7.877863ms"/>
+ <link id="13" bandwidth="1.792625MBps" latency="7.877863ms"/>
+ <link id="14" bandwidth="1.792625MBps" latency="7.877863ms"/>
+
+ <route src="Tremblay" dst="Jupiter">
+ <link_ctn id="0"/>
+ </route>
+ <route src="Tremblay" dst="Fafard">
+ <link_ctn id="1"/>
+ </route>
+ <route src="Tremblay" dst="Ginette">
+ <link_ctn id="2"/>
+ </route>
+ <route src="Tremblay" dst="Bourassa">
+ <link_ctn id="3"/>
+ </route>
+ <route src="Tremblay" dst="Lovelace">
+ <link_ctn id="4"/>
+ </route>
+ <route src="Jupiter" dst="Fafard">
+ <link_ctn id="5"/>
+ </route>
+ <route src="Jupiter" dst="Ginette">
+ <link_ctn id="6"/>
+ </route>
+ <route src="Jupiter" dst="Bourassa">
+ <link_ctn id="7"/>
+ </route>
+ <route src="Jupiter" dst="Lovelace">
+ <link_ctn id="8"/>
+ </route>
+ <route src="Fafard" dst="Ginette">
+ <link_ctn id="9"/>
+ </route>
+ <route src="Fafard" dst="Bourassa">
+ <link_ctn id="10"/>
+ </route>
+ <route src="Fafard" dst="Lovelace">
+ <link_ctn id="11"/>
+ </route>
+ <route src="Ginette" dst="Bourassa">
+ <link_ctn id="12"/>
+ </route>
+ <route src="Ginette" dst="Lovelace">
+ <link_ctn id="13"/>
+ </route>
+ <route src="Bourassa" dst="Lovelace">
+ <link_ctn id="14"/>
+ </route>
+
+ </AS>
+ </platform>
link->state_trace,
link->policy,
link->properties);
+
xbt_lib_set(link_lib, link->id, SURF_LINK_LEVEL, net_link);
}
NS3_HOST_LEVEL = xbt_lib_add_level(host_lib,(void_f_pvoid_t)free_ns3_host);
NS3_ASR_LEVEL = xbt_lib_add_level(as_router_lib,(void_f_pvoid_t)free_ns3_host);
- NS3_LINK_LEVEL = xbt_lib_add_level(link_lib,(void_f_pvoid_t)free_ns3_link);
}
NetworkNS3Model::~NetworkNS3Model() {
xbt_lib_t link_lib;
int SD_LINK_LEVEL; //Simdag level
int SURF_LINK_LEVEL; //Surf level
-int NS3_LINK_LEVEL; //link for ns3
xbt_lib_t as_router_lib;
int ROUTING_ASR_LEVEL; //Routing level
sg_platf_new_AS_begin(&AS);
((AsClusterFatTree*)current_routing)->parse_specific_arguments(cluster);
}
-
+
else{
XBT_DEBUG("<AS id=\"%s\"\trouting=\"Cluster\">", cluster->id);
AS.routing = A_surfxml_AS_routing_Cluster;
} else {
XBT_DEBUG("\tstate_file=\"\"");
}
-
+
xbt_dynar_t power_state_list = xbt_dynar_new(sizeof(double), NULL);
xbt_dynar_push(power_state_list,&cluster->power);
host.power_peak = power_state_list;
xbt_dynar_free(&radical_ends);
}
xbt_dynar_free(&radical_elements);
-
+
// For fat trees, the links must be created once all nodes have been added
if(cluster->topology == SURF_CLUSTER_FAT_TREE) {
((AsClusterFatTree*)current_routing)->create_links();