-double sg_maxmin_precision = 0.00001;
-double sg_surf_precision = 0.00001;
-int sg_concurrency_limit= 100;
+double sg_maxmin_precision = 0.00001; /* Change this with --cfg=maxmin/precision:VALUE */
+double sg_surf_precision = 0.00001; /* Change this with --cfg=surf/precision:VALUE */
+int sg_concurrency_limit = -1; /* Change this with --cfg=maxmin/concurrency-limit:VALUE */
static void lmm_variable_mallocator_free_f(void *var);
#define lmm_variable_mallocator_reset_f ((void_f_pvoid_t)nullptr)
static void lmm_update_modified_set(lmm_system_t sys, lmm_constraint_t cnst);
static void lmm_variable_mallocator_free_f(void *var);
#define lmm_variable_mallocator_reset_f ((void_f_pvoid_t)nullptr)
static void lmm_update_modified_set(lmm_system_t sys, lmm_constraint_t cnst);
lmm_variable_mallocator_free_f,
lmm_variable_mallocator_reset_f);
lmm_variable_mallocator_free_f,
lmm_variable_mallocator_reset_f);
cnst->bound = bound_value;
cnst->concurrency_maximum=0;
cnst->concurrency_current=0;
cnst->bound = bound_value;
cnst->concurrency_maximum=0;
cnst->concurrency_current=0;
cnst->usage = 0;
cnst->sharing_policy = 1; /* FIXME: don't hardcode the value */
insert_constraint(sys, cnst);
cnst->usage = 0;
cnst->sharing_policy = 1; /* FIXME: don't hardcode the value */
insert_constraint(sys, cnst);
{
lmm_variable_t var = xbt_new(s_lmm_variable_t, 1);
var->cnsts = nullptr; /* will be created by realloc */
{
lmm_variable_t var = xbt_new(s_lmm_variable_t, 1);
var->cnsts = nullptr; /* will be created by realloc */
* And then add it to enabled variables
*/
void lmm_on_disabled_var(lmm_system_t sys, lmm_constraint_t cnstr){
* And then add it to enabled variables
*/
void lmm_on_disabled_var(lmm_system_t sys, lmm_constraint_t cnstr){
XBT_DEBUG("Staging var (instead of enabling) because min concurrency slack %i, with weight %f and concurrency"
" share %i", minslack, weight, var->concurrency_share);
return;
XBT_DEBUG("Staging var (instead of enabling) because min concurrency slack %i, with weight %f and concurrency"
" share %i", minslack, weight, var->concurrency_share);
return;
- * This is dead code, but we may use it later for debug/trace.
+ * If the resource is not shared (ie in FATPIPE mode), then the the
+ * load is the max (not the sum) of all resource usages located on this resource.
+ * .
+ * \param cnst the lmm_constraint_t associated to the resource
*/
double lmm_constraint_get_usage(lmm_constraint_t cnst) {
double usage = 0.0;
xbt_swag_t elem_list = &(cnst->enabled_element_set);
void *_elem;
*/
double lmm_constraint_get_usage(lmm_constraint_t cnst) {
double usage = 0.0;
xbt_swag_t elem_list = &(cnst->enabled_element_set);
void *_elem;
if (cnst->sharing_policy)
usage += elem->value * elem->variable->value;
else if (usage < elem->value * elem->variable->value)
if (cnst->sharing_policy)
usage += elem->value * elem->variable->value;
else if (usage < elem->value * elem->variable->value)