X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/587055732de9a37dd695007b69b62b3a4fed1111..817f8a03cce56319fcefcbb7abe26a3d4153035a:/src/surf/surf.c diff --git a/src/surf/surf.c b/src/surf/surf.c index c07e0e5f96..89b92c3cd2 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -5,6 +5,8 @@ /* 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. */ +#include + #include "surf_private.h" #include "xbt/module.h" @@ -166,6 +168,7 @@ double generic_maxmin_share_resources2(xbt_swag_t running_actions, } else min = action->max_duration; + DEBUG5("Found an action (%p: duration = %f, remains = %f, value = %f) ! %f",action, action->max_duration, action->remains, value, min); for (action = xbt_swag_getNext(action, running_actions->offset); action; @@ -173,12 +176,18 @@ double generic_maxmin_share_resources2(xbt_swag_t running_actions, value = lmm_variable_getvalue(VARIABLE(action)); if (value > 0) { value = action->remains / value; - if (value < min) + if (value < min) { min = value; + DEBUG2("Updating min (value) with %p: %f",action, min); + } } - if ((action->max_duration >= 0) && (action->max_duration < min)) + if ((action->max_duration >= 0) && (action->max_duration < min)) { min = action->max_duration; + DEBUG2("Updating min (duration) with %p: %f",action, min); + } } + DEBUG1("min value : %f",min); + #undef VARIABLE return min; }