INFO3("Computation time for %f flops on %s: %f", computation_amount1, name1,
SD_workstation_get_computation_time(w1, computation_amount1));
INFO3("Computation time for %f flops on %s: %f", computation_amount2, name2,
SD_workstation_get_computation_time(w2, computation_amount2));
INFO2("Route between %s and %s:", name1, name2);
INFO3("Computation time for %f flops on %s: %f", computation_amount1, name1,
SD_workstation_get_computation_time(w1, computation_amount1));
INFO3("Computation time for %f flops on %s: %f", computation_amount2, name2,
SD_workstation_get_computation_time(w2, computation_amount2));
INFO2("Route between %s and %s:", name1, name2);
SD_route_get_communication_time(w1, w2, communication_amount12));
INFO4("Communication time for %f bytes between %s and %s: %f", communication_amount21, name2, name1,
SD_route_get_communication_time(w2, w1, communication_amount21));
SD_route_get_communication_time(w1, w2, communication_amount12));
INFO4("Communication time for %f bytes between %s and %s: %f", communication_amount21, name2, name1,
SD_route_get_communication_time(w2, w1, communication_amount21));
-
- const int workstation_number = 2;
- const SD_workstation_t workstation_list[] = {w1, w2};
- double computation_amount[] = {computation_amount1, computation_amount2};
- double communication_amount[] =
- {
- 0, communication_amount12,
- communication_amount21, 0
- };
- double rate = -1.0;
-
- /* estimated time */
- SD_task_t task = taskD;
- INFO2("Estimated time for '%s': %f", SD_task_get_name(task),
- SD_task_get_execution_time(task, workstation_number, workstation_list,
- computation_amount, communication_amount, rate));
-
- /* let's launch the simulation! */
-
- SD_task_schedule(taskA, workstation_number, workstation_list,
- computation_amount, communication_amount, rate);
- SD_task_schedule(taskB, workstation_number, workstation_list,
- computation_amount, communication_amount, rate);
- SD_task_schedule(taskC, workstation_number, workstation_list,
- computation_amount, communication_amount, rate);
- SD_task_schedule(taskD, workstation_number, workstation_list,
- computation_amount, communication_amount, rate);
-
- SD_task_t *changed_tasks;
-
- changed_tasks = SD_simulate(-1.0);
- xbt_assert0(changed_tasks[0] == taskD &&
- changed_tasks[1] == taskB &&
- changed_tasks[2] == taskC &&
- changed_tasks[3] == NULL,
- "Unexpected simulation results");
-
- xbt_free(changed_tasks);
-
+ {
+ const int workstation_number = 2;
+ const SD_workstation_t workstation_list[] = {w1, w2};
+ double computation_amount[] = {computation_amount1, computation_amount2};
+ double communication_amount[] =
+ {
+ 0, communication_amount12,
+ communication_amount21, 0
+ };
+ SD_task_t *changed_tasks;
+ double rate = -1.0;
+
+ /* estimated time */
+ SD_task_t task = taskD;
+ INFO2("Estimated time for '%s': %f", SD_task_get_name(task),
+ SD_task_get_execution_time(task, workstation_number, workstation_list,
+ computation_amount, communication_amount, rate));
+
+ /* let's launch the simulation! */
+
+ SD_task_schedule(taskA, workstation_number, workstation_list,
+ computation_amount, communication_amount, rate);
+ SD_task_schedule(taskB, workstation_number, workstation_list,
+ computation_amount, communication_amount, rate);
+ SD_task_schedule(taskC, workstation_number, workstation_list,
+ computation_amount, communication_amount, rate);
+ SD_task_schedule(taskD, workstation_number, workstation_list,
+ computation_amount, communication_amount, rate);
+
+ changed_tasks = SD_simulate(-1.0);
+ xbt_assert0(changed_tasks[0] == taskD &&
+ changed_tasks[1] == taskB &&
+ changed_tasks[2] == taskC &&
+ changed_tasks[3] == NULL,
+ "Unexpected simulation results");
+
+ xbt_free(changed_tasks);
+ }