Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cf0b64ae084e58d56263ae2f684e69d0a97840da
[simgrid.git] / testsuite / simdag / sd_test.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "simdag/simdag.h"
4
5 int main(int argc, char **argv) {
6   
7   /* No deployment file
8   if (argc < 3) {
9      printf ("Usage: %s platform_file deployment_file\n", argv[0]);
10      printf ("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]);
11      exit(1);
12   }
13   */
14
15   if (argc < 2) {
16      printf ("Usage: %s platform_file\n", argv[0]);
17      printf ("example: %s msg_platform.xml\n", argv[0]);
18      exit(1);
19   }
20
21   /* initialisation of SD */
22   SD_init(&argc, argv);
23
24   /* creation of the environment */
25   char * platform_file = argv[1];
26   SD_create_environment(platform_file);
27
28   /* creation of the tasks and their dependencies */
29   
30
31   /* let's launch the simulation! */
32   SD_simulate(100);
33
34   SD_clean();
35   return 0;
36 }