Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a Vivaldi network model, coded live during SUD'10 ;)
[simgrid.git] / src / surf / maxmin.c
index eb3ad2f..e0d093b 100644 (file)
@@ -66,8 +66,11 @@ void lmm_system_free(lmm_system_t sys)
   lmm_variable_t var = NULL;
   lmm_constraint_t cnst = NULL;
 
-  while ((var = extract_variable(sys)))
+  while ((var = extract_variable(sys))) {
+    WARN2("Variable %p (%d) still in LMM system when freing it: this may be a bug",
+        var,var->id_int);
     lmm_var_free(sys, var);
+  }
 
   while ((cnst = extract_constraint(sys)))
     lmm_cnst_free(sys, cnst);
@@ -501,6 +504,8 @@ void lmm_solve(lmm_system_t sys)
   xbt_swag_foreach(cnst, cnst_list) {
     /* INIT */
     cnst->remaining = cnst->bound;
+    if (cnst->remaining == 0)
+      continue;
     cnst->usage = 0;
     elem_list = &(cnst->element_set);
     xbt_swag_foreach(elem, elem_list) {