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
first implementation of floyd's get_onelink_routes
[simgrid.git]
/
src
/
surf
/
maxmin.c
diff --git
a/src/surf/maxmin.c
b/src/surf/maxmin.c
index
eb3ad2f
..
accceb5
100644
(file)
--- a/
src/surf/maxmin.c
+++ b/
src/surf/maxmin.c
@@
-1,6
+1,5
@@
-/* $Id$ */
-
-/* Copyright (c) 2004 Arnaud Legrand. All rights reserved. */
+/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-66,8
+65,11
@@
void lmm_system_free(lmm_system_t sys)
lmm_variable_t var = NULL;
lmm_constraint_t cnst = NULL;
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);
lmm_var_free(sys, var);
+ }
while ((cnst = extract_constraint(sys)))
lmm_cnst_free(sys, cnst);
while ((cnst = extract_constraint(sys)))
lmm_cnst_free(sys, cnst);
@@
-501,6
+503,8
@@
void lmm_solve(lmm_system_t sys)
xbt_swag_foreach(cnst, cnst_list) {
/* INIT */
cnst->remaining = cnst->bound;
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) {
cnst->usage = 0;
elem_list = &(cnst->element_set);
xbt_swag_foreach(elem, elem_list) {
@@
-719,6
+723,14
@@
XBT_INLINE lmm_constraint_t lmm_get_next_active_constraint(lmm_system_t sys,
return xbt_swag_getNext(cnst, (sys->active_constraint_set).offset);
}
return xbt_swag_getNext(cnst, (sys->active_constraint_set).offset);
}
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+XBT_INLINE int lmm_is_variable_limited_by_latency(lmm_variable_t var)
+{
+ return (double_equals(var->bound, var->value));
+}
+#endif
+
+
/** \brief Update the constraint set propagating recursively to
* other constraints so the system should not be entirely computed.
*
/** \brief Update the constraint set propagating recursively to
* other constraints so the system should not be entirely computed.
*