Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
useless cosmetics around NS3 long routes
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 23 May 2017 17:08:22 +0000 (19:08 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 23 May 2017 17:10:29 +0000 (19:10 +0200)
examples/msg/network-ns3/network-ns3.tesh
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp

index 09e51da..56410a0 100644 (file)
@@ -41,9 +41,9 @@ p Dogbone
 ! timeout 10
 $ ${bindir:=.}/network-ns3/network-ns3 ${srcdir:=.}/examples/platforms/dogbone.xml ${srcdir:=.}/examples/msg/network-ns3/dogbone_d.xml --cfg=network/model:NS3 "--log=root.fmt:[%h:%P(%i)]%e[%c/%p]%e%m%n"
 > [:maestro(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
 ! timeout 10
 $ ${bindir:=.}/network-ns3/network-ns3 ${srcdir:=.}/examples/platforms/dogbone.xml ${srcdir:=.}/examples/msg/network-ns3/dogbone_d.xml --cfg=network/model:NS3 "--log=root.fmt:[%h:%P(%i)]%e[%c/%p]%e%m%n"
 > [:maestro(0)] [xbt_cfg/INFO] Configuration change: Set 'network/model' to 'NS3'
-> [:maestro(0)] [ns3/INFO] Ignoring a route between S1 and C1 of length 3: Only routes of length 1 are considered with NS3.
-> You can ignore this warning if your hosts can still communicate when only considering routes of length 1.
-> You may also remove these routes to avoid this harmless message. Other long routes will be silently ignored.
+> [:maestro(0)] [ns3/WARNING] Ignoring a route between S1 and C1 of length 3: Only routes of length 1 are considered with NS3.
+> WARNING: You can ignore this warning if your hosts can still communicate when only considering routes of length 1.
+> WARNING: Remove long routes to avoid this harmless message; subsequent long routes will be silently ignored.
 > [C1:worker(3)] [msg_test/INFO] FLOW[0] : Receive 10000 bytes from S1 to C1
 > [C2:worker(4)] [msg_test/INFO] FLOW[1] : Receive 10000 bytes from S2 to C2
 
 > [C1:worker(3)] [msg_test/INFO] FLOW[0] : Receive 10000 bytes from S1 to C1
 > [C2:worker(4)] [msg_test/INFO] FLOW[1] : Receive 10000 bytes from S2 to C2
 
index a343a7a..937f4e9 100644 (file)
@@ -90,8 +90,6 @@ static void routeCreation_cb(bool symmetrical, simgrid::kernel::routing::NetPoin
                              simgrid::kernel::routing::NetPoint* gw_dst,
                              std::vector<simgrid::surf::LinkImpl*>* link_list)
 {
                              simgrid::kernel::routing::NetPoint* gw_dst,
                              std::vector<simgrid::surf::LinkImpl*>* link_list)
 {
-  static bool warned_about_long_routes = false;
-
   if (link_list->size() == 1) {
     simgrid::surf::LinkNS3* link = static_cast<simgrid::surf::LinkNS3*>(link_list->at(0));
 
   if (link_list->size() == 1) {
     simgrid::surf::LinkNS3* link = static_cast<simgrid::surf::LinkNS3*>(link_list->at(0));
 
@@ -117,13 +115,15 @@ static void routeCreation_cb(bool symmetrical, simgrid::kernel::routing::NetPoin
     xbt_free(link_bdw);
     xbt_free(link_lat);
   } else {
     xbt_free(link_bdw);
     xbt_free(link_lat);
   } else {
+    static bool warned_about_long_routes = false;
+
     if (not warned_about_long_routes)
     if (not warned_about_long_routes)
-      XBT_INFO(
-          "Ignoring a route between %s and %s of length %zu: Only routes of length 1 are considered with NS3.\n"
-          "You can ignore this warning if your hosts can still communicate when only considering routes of length 1.\n"
-          "You may also remove these routes to avoid this harmless message. Other long routes will be silently "
-          "ignored.",
-          src->cname(), dst->cname(), link_list->size());
+      XBT_WARN("Ignoring a route between %s and %s of length %zu: Only routes of length 1 are considered with NS3.\n"
+               "WARNING: You can ignore this warning if your hosts can still communicate when only considering routes "
+               "of length 1.\n"
+               "WARNING: Remove long routes to avoid this harmless message; subsequent long routes will be silently "
+               "ignored.",
+               src->cname(), dst->cname(), link_list->size());
     warned_about_long_routes = true;
   }
 }
     warned_about_long_routes = true;
   }
 }
index ecdb950..40a49d6 100644 (file)
@@ -1,13 +1,12 @@
-/* Copyright (c) 2004-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2004-2017. The SimGrid Team.  All rights reserved.         */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #ifndef NETWORK_NS3_HPP_
 #define NETWORK_NS3_HPP_
 
 #ifndef NETWORK_NS3_HPP_
 #define NETWORK_NS3_HPP_
 
-
-#include <xbt/base.h>
+#include "xbt/base.h"
 
 #include "network_interface.hpp"
 #include "src/surf/ns3/ns3_interface.h"
 
 #include "network_interface.hpp"
 #include "src/surf/ns3/ns3_interface.h"