Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
b1c74805710247bdcbcdea36c02f4958592b58cc
[simgrid.git] / teshsuite / simdag / partask / test_comp_only_par.c
1 /* Copyright (c) 2007, 2009-2011, 2013-2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include <stdio.h>
8 #include <stdlib.h>
9
10 #include "simdag/simdag.h"
11
12 int main(int argc, char **argv)
13 {
14
15   double time;
16   double comm_amount[] = { 0.0, 0.0, 0.0, 0.0 };
17   double comp_cost[] = { 1.0, 1.0 };
18
19   SD_task_t task;
20   xbt_dynar_t ret;
21
22   SD_init(&argc, argv);
23   SD_create_environment(argv[1]);
24
25   task = SD_task_create("partask", NULL, 1.0);
26   SD_task_schedule(task, 2, SD_workstation_get_list(), comp_cost,
27                    comm_amount, -1.0);
28
29   ret = SD_simulate(-1.0);
30   xbt_dynar_free(&ret);
31
32   time = SD_get_clock();
33
34   printf("%g\n", time);
35   fflush(stdout);
36
37   SD_task_destroy(task);
38
39   SD_exit();
40
41   return 0;
42 }