Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bugfix: setset cursors were incorrectly implemented. Now they work fine.
[simgrid.git] / teshsuite / simdag / basic6.c
1 /* test scheduling 2 tasks at the same time without artificial dependencies */
2
3 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
4  * All rights reserved.                                                     */
5
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. */
8
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include "simdag/simdag.h"
12
13 int main(int argc, char **argv)
14 {
15   double comm_cost[] = { 0.0, 0.0, 0.0, 0.0 };
16   double comp_cost[] = { 1.0 };
17   SD_task_t taskA, taskB;
18
19   SD_init(&argc, argv);
20   SD_create_environment(argv[1]);
21
22   taskA = SD_task_create("Task A", NULL, 1.0);
23   taskB = SD_task_create("Task B", NULL, 1.0);
24
25   SD_task_schedule(taskA, 1, SD_workstation_get_list(), comp_cost, comm_cost,
26                    -1.0);
27   SD_task_schedule(taskB, 1, SD_workstation_get_list(), comp_cost, comm_cost,
28                    -1.0);
29
30   SD_simulate(-1.0);
31
32   SD_exit();
33   return 0;
34 }