X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f9436b840852218b39dce22d6057b6f223168daa..47fa64212246f06d6f2606de23ccba9809765e59:/src/surf/network_ib.cpp diff --git a/src/surf/network_ib.cpp b/src/surf/network_ib.cpp index 8304958761..48b9c1e4da 100644 --- a/src/surf/network_ib.cpp +++ b/src/surf/network_ib.cpp @@ -1,5 +1,5 @@ /* Copyright (c) 2014-2015. The SimGrid Team. - * All rights reserved. */ +*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. */ @@ -125,7 +125,6 @@ namespace simgrid { } void NetworkIBModel::computeIBfactors(IBNode *root) { - double penalized_bw=0.0; double num_comm_out = (double) root->ActiveCommsUp.size(); double max_penalty_out=0.0; //first, compute all outbound penalties to get their max @@ -159,7 +158,7 @@ namespace simgrid { if((*it)->init_rate==-1) (*it)->init_rate= rate_before_update; - penalized_bw= ! num_comm_out ? (*it)->init_rate : (*it)->init_rate /penalty; + double penalized_bw = num_comm_out ? (*it)->init_rate / penalty : (*it)->init_rate; if (not double_equals(penalized_bw, rate_before_update, sg_surf_precision)) { XBT_DEBUG("%d->%d action %p penalty updated : bw now %f, before %f , initial rate %f", root->id,(*it)->destination->id,(*it)->action,penalized_bw, (*it)->action->getBound(), (*it)->init_rate );