Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[routing] rename routing_global_t -> routing_platf_t (and friends)
[simgrid.git] / teshsuite / simdag / platforms / Evaluate_parse_time.c
1 /* Copyright (c) 2008, 2009, 2010, 2011. 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 //teshsuite/simdag/platforms/evaluate_parse_time ../examples/platforms/nancy.xml
8
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include "simdag/simdag.h"
12 #include "surf/surf_private.h"
13 #include "xbt/xbt_os_time.h"
14
15 extern routing_platf_t routing_platf;
16
17 int main(int argc, char **argv)
18 {
19   xbt_os_timer_t timer = xbt_os_timer_new();
20
21         /* initialization of SD */
22         SD_init(&argc, argv);
23
24         /* creation of the environment, timed */
25         xbt_os_timer_start(timer);
26         SD_create_environment(argv[1]);
27   xbt_os_timer_stop(timer);
28
29   /* Display the result and exit after cleanup */
30         printf( "%lf\n", xbt_os_timer_elapsed(timer) );
31           printf("Workstation number: %d, link number: %d\n",
32                  SD_workstation_get_number(), SD_link_get_number());
33         if(argv[2]){
34                 printf("Wait for %ss\n",argv[2]);
35                 sleep(atoi(argv[2]));
36         }
37
38         SD_exit();
39
40         free(timer);
41         return 0;
42 }