Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use the get_latency function from the routing mechanism in network model
authoralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 2 Dec 2010 22:25:58 +0000 (22:25 +0000)
committeralegrand <alegrand@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 2 Dec 2010 22:25:58 +0000 (22:25 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8947 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/network.c

index 3d448f5..2675db1 100644 (file)
@@ -576,10 +576,10 @@ static surf_action_t net_communicate(const char *src_name,
   action->latency = 0.0;
   action->weight = 0.0;
   bandwidth_bound = -1.0;
+  action->weight = action->latency = global_routing->get_latency(src,dst);
+
   xbt_dynar_foreach(route, i, link) {
-    action->latency += link->lat_current;
     action->weight +=
-        link->lat_current +
         sg_weight_S_parameter /
         (link->lmm_resource.power.peak * link->lmm_resource.power.scale);
     if (bandwidth_bound < 0.0)