X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e2affb82410af2d571931cd5f8ed48824939b984..dd168417de56ff999b989676fc30debbc433d6b3:/examples/simdag/sd_comm_throttling.c diff --git a/examples/simdag/sd_comm_throttling.c b/examples/simdag/sd_comm_throttling.c index 4313e01d86..a2f9f8a065 100644 --- a/examples/simdag/sd_comm_throttling.c +++ b/examples/simdag/sd_comm_throttling.c @@ -66,14 +66,17 @@ int main(int argc, char **argv) XBT_INFO("Simulation stopped after %.4f seconds", SD_get_clock()); xbt_dynar_foreach(changed_tasks, ctr, task) { XBT_INFO("Task '%s' start time: %f, finish time: %f", - SD_task_get_name(task), - SD_task_get_start_time(task), - SD_task_get_finish_time(task)); + SD_task_get_name(task), + SD_task_get_start_time(task), + SD_task_get_finish_time(task)); } /* 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 + */ if (SD_task_get_state(taskC) == SD_DONE) - SD_task_set_rate(taskD, 0.5); + SD_task_set_rate(taskD, 6.25); } XBT_DEBUG("Destroying tasks...");