Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update the platform files: the root tag is now called 'platform', not 'platform_descr...
[simgrid.git] / teshsuite / simdag / basic6.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "simdag/simdag.h"
4
5 /*
6  * test: scheduling 2 tasks at the same time
7  * without artificial dependecies
8  * 
9  * author: sahu
10  */
11
12 int main(int argc, char **argv) {
13     double comm_cost[] = { 0.0, 0.0, 0.0, 0.0 };
14     double comp_cost[] = { 1.0 };
15         SD_task_t taskA, taskB;
16         
17         SD_init(&argc, argv);
18     SD_create_environment(argv[1]);
19
20     taskA = SD_task_create("Task A", NULL, 1.0);
21     taskB = SD_task_create("Task B", NULL, 1.0);
22
23     SD_task_schedule(taskA, 1, SD_workstation_get_list(), comp_cost, comm_cost,
24                         -1.0);
25         SD_task_schedule(taskB, 1, SD_workstation_get_list(), comp_cost, comm_cost,
26                         -1.0);
27             
28     SD_simulate(-1.0);
29
30     SD_exit();
31     return 0;
32 }