X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5b3677b425b9cc6949c1573d59ac772540cbf4b2..77dc8c37f29bb55bcbbbda3da52f06d1fe438510:/examples/simdag/sd_comm_throttling.c diff --git a/examples/simdag/sd_comm_throttling.c b/examples/simdag/sd_comm_throttling.c index b43af3709a..8f5f294e5b 100644 --- a/examples/simdag/sd_comm_throttling.c +++ b/examples/simdag/sd_comm_throttling.c @@ -6,7 +6,7 @@ #include #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/ex.h" #include "xbt/log.h" @@ -74,8 +74,10 @@ int main(int argc, char **argv) /* let throttle the communication for taskD if its parent is SD_DONE */ /* the bandwidth is 1.25e8, the data size is 1e7, and we want to throttle * the bandwidth by a factor 2. the rate is then 1.25e8/(2*1e7)=6.25 + * Changing the rate is possible before the task execution starts (in SD_RUNNING + * state). */ - if (SD_task_get_state(taskC) == SD_DONE) + if (SD_task_get_state(taskC) == SD_DONE && SD_task_get_state(taskD) < SD_RUNNING) SD_task_set_rate(taskD, 6.25); xbt_dynar_free_container(&changed_tasks); }