From 9707c78bfa2c1c693947524ea2b3dfe32f0288c8 Mon Sep 17 00:00:00 2001 From: alegrand Date: Tue, 14 Aug 2007 15:11:37 +0000 Subject: [PATCH] Bug fix. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4090 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/surf/fair_bottleneck.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/surf/fair_bottleneck.c b/src/surf/fair_bottleneck.c index 51aef93692..5c87a18797 100644 --- a/src/surf/fair_bottleneck.c +++ b/src/surf/fair_bottleneck.c @@ -69,6 +69,10 @@ void bottleneck_solve(lmm_system_t sys) * Compute Usage and store the variables that reach the maximum. */ while (1) { +/* if (XBT_LOG_ISENABLED(surf_maxmin, xbt_log_priority_debug)) { */ +/* DEBUG0("Fair bottleneck done"); */ +/* lmm_print(sys); */ +/* } */ DEBUG1("******* Constraints to process: %d *******", xbt_swag_size(cnst_list)); xbt_swag_foreach_safe(cnst, cnst_next, cnst_list) { int nb = 0; @@ -121,6 +125,7 @@ void bottleneck_solve(lmm_system_t sys) while ((cnst_next = xbt_swag_extract(&cnst_to_update))) { int nb = 0; + double remaining = cnst_next->remaining; elem_list = &(cnst_next->element_set); xbt_swag_foreach(elem, elem_list) { if (elem->variable->weight <= 0) @@ -142,7 +147,7 @@ void bottleneck_solve(lmm_system_t sys) break; if (var->value == 0.0) { DEBUG2("\tUpdating var %p (%g)",var,var->value); - var->value = var->weight * cnst_next->remaining / (nb * elem->value); + var->value = var->weight * remaining / (nb * elem->value); /* Update usage */ -- 2.20.1