From f1e5efb3df61d23b5d75cdebd02a5f7b8a2d9477 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 10 Jun 2017 21:33:58 +0200 Subject: [PATCH] NS3 probably don't like bandwidths in Bytes, so use bits --- src/surf/network_ns3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 2cf77d2ed5..9404d6bc43 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -57,7 +57,7 @@ NetPointNs3::NetPointNs3() static void clusterCreation_cb(sg_platf_cluster_cbarg_t cluster) { char* lat = bprintf("%fs", cluster->lat); - char* bw = bprintf("%fBps", cluster->bw); + char* bw = bprintf("%fbps", cluster->bw * 8); for (int i : *cluster->radicals) { // Routers don't create a router on the other end of the private link by themselves. @@ -96,7 +96,7 @@ static void routeCreation_cb(bool symmetrical, simgrid::kernel::routing::NetPoin XBT_DEBUG("Route from '%s' to '%s' with link '%s' %s", src->cname(), dst->cname(), link->cname(), (symmetrical ? "(symmetrical)" : "(not symmetrical)")); - char* link_bdw = bprintf("%fBps", link->bandwidth()); + char* link_bdw = bprintf("%fbps", link->bandwidth() * 8); char* link_lat = bprintf("%fs", link->latency()); // XBT_DEBUG("src (%s), dst (%s), src_id = %d, dst_id = %d",src,dst, src_id, dst_id); -- 2.20.1