A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Increase number of host for cluster from 254 to 65000
[simgrid.git]
/
src
/
surf
/
maxmin.c
diff --git
a/src/surf/maxmin.c
b/src/surf/maxmin.c
index
0c370f0
..
2efcd6f
100644
(file)
--- a/
src/surf/maxmin.c
+++ b/
src/surf/maxmin.c
@@
-89,7
+89,7
@@
XBT_INLINE void lmm_variable_disable(lmm_system_t sys, lmm_variable_t var)
int i;
lmm_element_t elem = NULL;
int i;
lmm_element_t elem = NULL;
- XBT_IN
_F
("(sys=%p, var=%p)", sys, var);
+ XBT_IN("(sys=%p, var=%p)", sys, var);
sys->modified = 1;
for (i = 0; i < var->cnsts_number; i++) {
sys->modified = 1;
for (i = 0; i < var->cnsts_number; i++) {
@@
-102,7
+102,7
@@
XBT_INLINE void lmm_variable_disable(lmm_system_t sys, lmm_variable_t var)
lmm_update_modified_set(sys, elem->constraint);
}
var->cnsts_number = 0;
lmm_update_modified_set(sys, elem->constraint);
}
var->cnsts_number = 0;
- XBT_OUT;
+ XBT_OUT
()
;
}
static void lmm_var_free(lmm_system_t sys, lmm_variable_t var)
}
static void lmm_var_free(lmm_system_t sys, lmm_variable_t var)
@@
-115,7
+115,7
@@
static void lmm_var_free(lmm_system_t sys, lmm_variable_t var)
static XBT_INLINE void lmm_cnst_free(lmm_system_t sys,
lmm_constraint_t cnst)
{
static XBT_INLINE void lmm_cnst_free(lmm_system_t sys,
lmm_constraint_t cnst)
{
-/* xbt_assert
0
(xbt_swag_size(&(cnst->element_set)), */
+/* xbt_assert(xbt_swag_size(&(cnst->element_set)), */
/* "This list should be empty!"); */
remove_active_constraint(sys, cnst);
free(cnst);
/* "This list should be empty!"); */
remove_active_constraint(sys, cnst);
free(cnst);
@@
-185,7
+185,7
@@
lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id,
lmm_variable_t var = NULL;
int i;
lmm_variable_t var = NULL;
int i;
- XBT_IN
_F
("(sys=%p, id=%p, weight=%f, bound=%f, num_cons =%d)",
+ XBT_IN("(sys=%p, id=%p, weight=%f, bound=%f, num_cons =%d)",
sys, id, weight, bound, number_of_constraints);
var = xbt_mallocator_get(sys->variable_mallocator);
sys, id, weight, bound, number_of_constraints);
var = xbt_mallocator_get(sys->variable_mallocator);
@@
-222,7
+222,7
@@
lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id,
xbt_swag_insert_at_head(var, &(sys->variable_set));
else
xbt_swag_insert_at_tail(var, &(sys->variable_set));
xbt_swag_insert_at_head(var, &(sys->variable_set));
else
xbt_swag_insert_at_tail(var, &(sys->variable_set));
- XBT_OUT;
+ XBT_OUT
()
;
return var;
}
return var;
}
@@
-249,7
+249,7
@@
void lmm_expand(lmm_system_t sys, lmm_constraint_t cnst,
sys->modified = 1;
sys->modified = 1;
- xbt_assert
0
(var->cnsts_number < var->cnsts_size, "Too much constraints");
+ xbt_assert(var->cnsts_number < var->cnsts_size, "Too much constraints");
elem = &(var->cnsts[var->cnsts_number++]);
elem = &(var->cnsts[var->cnsts_number++]);
@@
-350,13
+350,13
@@
static XBT_INLINE void saturated_constraint_set_update(lmm_system_t sys,
{
lmm_constraint_t useless_cnst = NULL;
{
lmm_constraint_t useless_cnst = NULL;
- XBT_IN
_F
("sys=%p, cnst=%p, min_usage=%f", sys, cnst, *min_usage);
+ XBT_IN("sys=%p, cnst=%p, min_usage=%f", sys, cnst, *min_usage);
if (cnst->usage <= 0) {
if (cnst->usage <= 0) {
- XBT_OUT;
+ XBT_OUT
()
;
return;
}
if (cnst->remaining <= 0) {
return;
}
if (cnst->remaining <= 0) {
- XBT_OUT;
+ XBT_OUT
()
;
return;
}
if ((*min_usage < 0) || (*min_usage > cnst->remaining / cnst->usage)) {
return;
}
if ((*min_usage < 0) || (*min_usage > cnst->remaining / cnst->usage)) {
@@
-372,7
+372,7
@@
static XBT_INLINE void saturated_constraint_set_update(lmm_system_t sys,
} else if (*min_usage == cnst->remaining / cnst->usage) {
xbt_swag_insert(cnst, &(sys->saturated_constraint_set));
}
} else if (*min_usage == cnst->remaining / cnst->usage) {
xbt_swag_insert(cnst, &(sys->saturated_constraint_set));
}
- XBT_OUT;
+ XBT_OUT
()
;
}
static XBT_INLINE void saturated_variable_set_update(lmm_system_t sys)
}
static XBT_INLINE void saturated_variable_set_update(lmm_system_t sys)
@@
-469,7
+469,7
@@
void lmm_print(lmm_system_t sys)
// XBT_DEBUG("%s", trace_buf);
fprintf(stderr, "%s\n", trace_buf);
trace_buf[0] = '\000';
// XBT_DEBUG("%s", trace_buf);
fprintf(stderr, "%s\n", trace_buf);
trace_buf[0] = '\000';
- xbt_assert
3
(!double_positive(sum - cnst->bound),
+ xbt_assert(!double_positive(sum - cnst->bound),
"Incorrect value (%f is not smaller than %f): %g",
sum, cnst->bound, sum - cnst->bound);
}
"Incorrect value (%f is not smaller than %f): %g",
sum, cnst->bound, sum - cnst->bound);
}
@@
-480,7
+480,7
@@
void lmm_print(lmm_system_t sys)
if (var->bound > 0) {
XBT_DEBUG("'%d'(%f) : %f (<=%f)", var->id_int, var->weight, var->value,
var->bound);
if (var->bound > 0) {
XBT_DEBUG("'%d'(%f) : %f (<=%f)", var->id_int, var->weight, var->value,
var->bound);
- xbt_assert
2
(!double_positive(var->value - var->bound),
+ xbt_assert(!double_positive(var->value - var->bound),
"Incorrect value (%f is not smaller than %f",
var->value, var->bound);
} else {
"Incorrect value (%f is not smaller than %f",
var->value, var->bound);
} else {
@@
-505,7
+505,7
@@
void lmm_solve(lmm_system_t sys)
if (!(sys->modified))
return;
if (!(sys->modified))
return;
- XBT_IN
_F
("(sys=%p)", sys);
+ XBT_IN("(sys=%p)", sys);
/*
* Compute Usage and store the variables that reach the maximum.
/*
* Compute Usage and store the variables that reach the maximum.
@@
-650,7
+650,7
@@
void lmm_solve(lmm_system_t sys)
if (XBT_LOG_ISENABLED(surf_maxmin, xbt_log_priority_debug)) {
lmm_print(sys);
}
if (XBT_LOG_ISENABLED(surf_maxmin, xbt_log_priority_debug)) {
lmm_print(sys);
}
- XBT_OUT;
+ XBT_OUT
()
;
}
/* Not a O(1) function */
}
/* Not a O(1) function */
@@
-703,7
+703,7
@@
void lmm_update_variable_weight(lmm_system_t sys, lmm_variable_t var,
if (weight == var->weight)
return;
if (weight == var->weight)
return;
- XBT_IN
_F
("(sys=%p, var=%p, weight=%f)", sys, var, weight);
+ XBT_IN("(sys=%p, var=%p, weight=%f)", sys, var, weight);
sys->modified = 1;
var->weight = weight;
xbt_swag_remove(var, &(sys->variable_set));
sys->modified = 1;
var->weight = weight;
xbt_swag_remove(var, &(sys->variable_set));
@@
-725,7
+725,7
@@
void lmm_update_variable_weight(lmm_system_t sys, lmm_variable_t var,
if (!weight)
var->value = 0.0;
if (!weight)
var->value = 0.0;
- XBT_OUT;
+ XBT_OUT
()
;
}
XBT_INLINE double lmm_get_variable_weight(lmm_variable_t var)
}
XBT_INLINE double lmm_get_variable_weight(lmm_variable_t var)