Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Large-scale simulations need bigger mallocators
[simgrid.git] / src / surf / maxmin.c
index ad12c40..d2bd685 100644 (file)
@@ -15,6 +15,8 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_maxmin, surf,
                                 "Logging specific to SURF (maxmin)");
 
+double sg_maxmin_precision = 0.00001;
+
 static void *lmm_variable_mallocator_new_f(void);
 static void lmm_variable_mallocator_free_f(void *var);
 static void lmm_variable_mallocator_reset_f(void *var);
@@ -24,6 +26,8 @@ static void lmm_remove_all_modified_set(lmm_system_t sys);
 int sg_maxmin_selective_update = 1;
 static int Global_debug_id = 1;
 static int Global_const_debug_id = 1;
+extern xbt_swag_t keep_track;
+
 lmm_system_t lmm_system_new(void)
 {
   lmm_system_t l = NULL;
@@ -53,7 +57,7 @@ lmm_system_t lmm_system_new(void)
   xbt_swag_init(&(l->saturated_constraint_set),
                 xbt_swag_offset(cnst, saturated_constraint_set_hookup));
 
-  l->variable_mallocator = xbt_mallocator_new(64,
+  l->variable_mallocator = xbt_mallocator_new(65536,
                                               lmm_variable_mallocator_new_f,
                                               lmm_variable_mallocator_free_f,
                                               lmm_variable_mallocator_reset_f);
@@ -538,6 +542,9 @@ void lmm_solve(lmm_system_t sys)
           cnst->usage = elem->value / elem->variable->weight;
 
         make_elem_active(elem);
+        if(keep_track){
+            xbt_swag_insert((elem->variable)->id, keep_track);
+        }
       }
     }
     DEBUG2("Constraint Usage '%d' : %f", cnst->id_int, cnst->usage);