3 /* Copyright (c) 2007, 2009, 2010. The SimGrid Team.
4 * All rights reserved. */
6 /* This program is free software; you can redistribute it and/or modify it
7 * under the terms of the license (GNU LGPL) which comes with this package. */
12 #include "simdag/simdag.h"
15 * bw and latency test 3
16 * same intention as test 2
17 * sending 2 x 1 bytes at the same time
18 * this time in opposite direction
22 int main(int argc, char **argv)
28 double communication_amount1[] = { 0.0, 1.0, 0.0, 0.0 };
29 double communication_amount2[] = { 0.0, 0.0, 1.0, 0.0 };
30 double no_cost1[] = { 0.0 };
31 double no_cost[] = { 0.0, 0.0 };
34 SD_create_environment(argv[1]);
36 root = SD_task_create("Root", NULL, 1.0);
37 task1 = SD_task_create("Comm 1", NULL, 1.0);
38 task2 = SD_task_create("Comm 2", NULL, 1.0);
40 SD_task_schedule(root, 1, SD_workstation_get_list(), no_cost1,
42 SD_task_schedule(task1, 2, SD_workstation_get_list(), no_cost,
43 communication_amount1, -1.0);
44 SD_task_schedule(task2, 2, SD_workstation_get_list(), no_cost,
45 communication_amount2, -1.0);
47 SD_task_dependency_add(NULL, NULL, root, task1);
48 SD_task_dependency_add(NULL, NULL, root, task2);
52 time = SD_get_clock();
57 SD_task_destroy(root);
58 SD_task_destroy(task1);
59 SD_task_destroy(task2);