1 /* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
2 * All rights reserved. */
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. */
7 //for i in $(seq 1 100); do teshsuite/simdag/platforms/evaluate_get_route_time ../examples/platforms/One_cluster.xml 1 2> /tmp/null ; done
12 #include "simdag/simdag.h"
13 #include "surf/surf_private.h"
16 #define BILLION 1000000000L;
17 extern routing_global_t global_routing;
19 int main(int argc, char **argv)
21 SD_workstation_t w1, w2;
22 const SD_workstation_t *workstations;
25 struct timespec start, stop;
28 /* initialisation of SD */
31 /* creation of the environment */
32 SD_create_environment(argv[1]);
34 workstations = SD_workstation_get_list();
35 list_size = SD_workstation_get_number();
39 clock_gettime( CLOCK_REALTIME, &time);
51 printf("%d\tand\t%d\t\t",i,j);
53 if( clock_gettime( CLOCK_REALTIME, &start) == -1 ) {
54 perror( "clock gettime" );
58 SD_route_get_list(w1, w2);
60 if( clock_gettime( CLOCK_REALTIME, &stop) == -1 ) {
61 perror( "clock gettime" );
65 accum = ( stop.tv_sec - start.tv_sec )
66 + (double)( stop.tv_nsec - start.tv_nsec )
68 printf("%lf\n", accum);