Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
set latency to 0 before calling getRouteAndLatency
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 19 Jan 2016 14:00:21 +0000 (15:00 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 19 Jan 2016 14:05:35 +0000 (15:05 +0100)
src/simdag/sd_workstation.cpp

index f959d3e..67522e2 100644 (file)
@@ -306,7 +306,7 @@ double SD_workstation_get_computation_time(SD_workstation_t workstation,
 double SD_route_get_latency(SD_workstation_t src, SD_workstation_t dst)
 {
   xbt_dynar_t route = NULL;
-  double latency;
+  double latency = 0;
 
   routing_platf->getRouteAndLatency(src->pimpl_netcard, dst->pimpl_netcard,
                                     &route, &latency);
@@ -369,7 +369,7 @@ double SD_route_get_communication_time(SD_workstation_t src,
   xbt_dynar_t route = NULL;
   int nb_links;
   double bandwidth, min_bandwidth;
-  double latency;
+  double latency = 0;
   int i;
 
   xbt_assert(bytes_amount >= 0, "bytes_amount must be greater than or equal to zero");