X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/433cc2bc6f5a56c5443258a3d2fb668cb22a745c..e1a94e1131e309dd8cf98bb4bf650f3b23d3c2d5:/src/simdag/sd_global.c diff --git a/src/simdag/sd_global.c b/src/simdag/sd_global.c index 95901fa7e5..915cb50254 100644 --- a/src/simdag/sd_global.c +++ b/src/simdag/sd_global.c @@ -290,6 +290,10 @@ xbt_swag_t SD_simulate_swag(double how_long) { if (dst->is_not_ready > 0) dst->is_not_ready--; + XBT_DEBUG("Released a dependency on %s: %d remain(s). Became schedulable if %d=0", + SD_task_get_name(dst), dst->unsatisfied_dependencies, + dst->is_not_ready); + if (!(dst->unsatisfied_dependencies)) { if (__SD_task_is_scheduled(dst)) __SD_task_set_state(dst, SD_RUNNABLE); @@ -297,6 +301,10 @@ xbt_swag_t SD_simulate_swag(double how_long) { __SD_task_set_state(dst, SD_SCHEDULABLE); } + if (__SD_task_is_not_scheduled(dst) && !(dst->is_not_ready)) { + __SD_task_set_state(dst, SD_SCHEDULABLE); + } + if (SD_task_get_kind(dst) == SD_TASK_COMM_E2E) { SD_dependency_t comm_dep; SD_task_t comm_dst; @@ -306,6 +314,10 @@ xbt_swag_t SD_simulate_swag(double how_long) { comm_dst->is_not_ready > 0) { comm_dst->is_not_ready--; + XBT_DEBUG("%s is a transfer, %s may be ready now if %d=0", + SD_task_get_name(dst), SD_task_get_name(comm_dst), + comm_dst->is_not_ready); + if (!(comm_dst->is_not_ready)) { __SD_task_set_state(comm_dst, SD_SCHEDULABLE); }