From f3677661714bf6122d678071c0bd44141417be14 Mon Sep 17 00:00:00 2001 From: Arnaud Legrand Date: Thu, 3 Apr 2014 17:44:46 +0200 Subject: [PATCH] Fix bug #17132 (surf.c:366: The Impossible Did Happen (yet again)). This occured only when a fatpipe had two (or more) flows with different bandwidth bounds. Only one would get bandwidth and because of early termination in this loop, the constraint was never considered ever again, hence the other flow would stay with a share of 0. --- src/surf/maxmin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/surf/maxmin.cpp b/src/surf/maxmin.cpp index c2d5e554c9..8f885199e9 100644 --- a/src/surf/maxmin.cpp +++ b/src/surf/maxmin.cpp @@ -746,8 +746,8 @@ void lmm_solve(lmm_system_t sys) elem_list = &(cnst->element_set); xbt_swag_foreach(_elem, elem_list) { elem = (lmm_element_t)_elem; - if (elem->variable->weight <= 0 || elem->variable->value > 0) - break; + if (elem->variable->weight <= 0) break; + if (elem->variable->value > 0) continue; if (elem->value > 0) cnst->usage = MAX(cnst->usage, elem->value / elem->variable->weight); } -- 2.20.1