From: Martin Quinson Date: Sun, 7 Feb 2016 14:09:48 +0000 (+0100) Subject: revalidate the NS3 tests X-Git-Tag: v3_13~949 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6822d98a2c791d9ba58b20450cb0536410e4c2bf revalidate the NS3 tests --- diff --git a/examples/msg/ns3/Two_clusters-d.xml b/examples/msg/ns3/Two_clusters-d.xml index 5132ff15ef..b7d2b0f40f 100644 --- a/examples/msg/ns3/Two_clusters-d.xml +++ b/examples/msg/ns3/Two_clusters-d.xml @@ -2,13 +2,13 @@ - + - + - + diff --git a/examples/msg/ns3/ns3.c b/examples/msg/ns3/ns3.c index fecc41cf84..ac1b6adf04 100644 --- a/examples/msg/ns3/ns3.c +++ b/examples/msg/ns3/ns3.c @@ -56,12 +56,8 @@ int count_finished = 0; /** master */ int master(int argc, char *argv[]) { - char *slavename = NULL; double task_comm_size = 0; msg_task_t todo; - char id_alias[10]; - //unique id to control statistics - int id = -1; xbt_assert(argc==4,"Strange number of arguments expected 3 got %d", argc - 1); @@ -73,17 +69,16 @@ int master(int argc, char *argv[]) xbt_assert(read, "Invalid argument %s\n", argv[1]); /* slave name */ - slavename = argv[2]; - id = atoi(argv[3]); - sprintf(id_alias, "flow_%d", id); + char *slavename = argv[2]; + int id = atoi(argv[3]); //unique id to control statistics + char *id_alias = bprintf("flow_%d", id); slavenames[id] = slavename; TRACE_category(id_alias); masternames[id] = MSG_host_get_name(MSG_host_self()); { /* Task creation. */ - char sprintf_buffer[64] = "Task_0"; - todo = MSG_task_create(sprintf_buffer, 100*task_comm_size, task_comm_size, NULL); + todo = MSG_task_create("Task_0", 100*task_comm_size, task_comm_size, NULL); MSG_task_set_category(todo, id_alias); //keep track of running tasks gl_task_array[id] = todo; @@ -100,11 +95,11 @@ int master(int argc, char *argv[]) /* time measurement */ sprintf(id_alias, "%d", id); start_time = MSG_get_clock(); - //MSG_task_execute(todo); MSG_task_send(todo, id_alias); end_time = MSG_get_clock(); XBT_DEBUG ("Finished"); + xbt_free(id_alias); return 0; } /* end_of_master */ diff --git a/examples/msg/ns3/ns3.tesh b/examples/msg/ns3/ns3.tesh index 06aea56e5a..0574d3389a 100644 --- a/examples/msg/ns3/ns3.tesh +++ b/examples/msg/ns3/ns3.tesh @@ -8,19 +8,19 @@ p throughoutly test NS3. p 3hosts 2links $ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3hosts_2links_d.xml --cfg=network/model:NS3 "--log=root.fmt:[%h:%P(%i)]%e[%c/%p]%e%m%n" -> [:(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' +> [:maestro(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' > [Jupiter:slave(2)] [msg_test/INFO] FLOW[1] : Receive 100 bytes from Tremblay to Jupiter p 6hosts 3links $ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3links-d.xml --cfg=network/model:NS3 "--log=root.fmt:[%h:%P(%i)]%e[%c/%p]%e%m%n" -> [:(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' +> [:maestro(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' > [Jupiter:slave(2)] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from Tremblay to Jupiter > [Ginette:slave(4)] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from Fafard to Ginette > [Lovelace:slave(6)] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from Bourassa to Lovelace $ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${srcdir:=.}/examples/msg/ns3/3links-d-timer.xml --cfg=network/model:NS3 "--log=root.fmt:[%h:%P(%i)]%e[%c/%p]%e%m%n" -> [:(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' +> [:maestro(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' > [Jupiter:slave(2)] [msg_test/INFO] FLOW[1] : Receive 100000 bytes from Tremblay to Jupiter > [Ginette:slave(4)] [msg_test/INFO] FLOW[2] : Receive 1000000 bytes from Fafard to Ginette > [Lovelace:slave(6)] [msg_test/INFO] FLOW[3] : Receive 2000000 bytes from Bourassa to Lovelace @@ -29,11 +29,11 @@ $ ns3/ns3 ${srcdir:=.}/examples/platforms/small_platform_one_link_routes.xml ${s p One cluster $ ns3/ns3 ${srcdir:=.}/examples/platforms/cluster.xml ${srcdir:=.}/examples/msg/ns3/One_cluster-d.xml --cfg=network/model:NS3 "--log=root.fmt:[%h:%P(%i)]%e[%c/%p]%e%m%n" -> [:(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' +> [:maestro(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' > [node-6.acme.org:slave(2)] [msg_test/INFO] FLOW[1] : Receive 100 bytes from node-2.acme.org to node-6.acme.org p Two clusters $ ns3/ns3 ${srcdir:=.}/examples/platforms/clusters_routing_full.xml ${srcdir:=.}/examples/msg/ns3/Two_clusters-d.xml --cfg=network/model:NS3 "--log=root.fmt:[%h:%P(%i)]%e[%c/%p]%e%m%n" -> [:(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' -> [node16.acme.org:slave(2)] [msg_test/INFO] FLOW[1] : Receive 100 bytes from node3.acme.org to node16.acme.org +> [:maestro(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3' +> [node-16.acme.org:slave(2)] [msg_test/INFO] FLOW[1] : Receive 100 bytes from node-3.acme.org to node-16.acme.org