X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a243b4c3535f516d05259cac06963c422d4aadc0..ec4e2d87d99b8ad76c9096033eb858e9052b09fa:/teshsuite/simdag/platforms/flatifier.c diff --git a/teshsuite/simdag/platforms/flatifier.c b/teshsuite/simdag/platforms/flatifier.c index 0b735e49d3..462f159d2b 100644 --- a/teshsuite/simdag/platforms/flatifier.c +++ b/teshsuite/simdag/platforms/flatifier.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2013. The SimGrid Team. +/* Copyright (c) 2008-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -15,13 +15,13 @@ #include -#include "simdag/simdag.h" +#include "simgrid/simdag.h" #include "xbt/log.h" #include "xbt/dict.h" #include "xbt/ex.h" #include "xbt/xbt_os_time.h" #include "surf/surf.h" -#include "surf/surf_private.h" +#include "src/surf/surf_private.h" static const char link_ctn_v2[] = "link:ctn"; static const char link_ctn_v3[] = "link_ctn"; @@ -97,8 +97,8 @@ int main(int argc, char **argv) xbt_lib_cursor_t cursor_src = NULL; xbt_lib_cursor_t cursor_dst = NULL; char *src,*dst,*key,*data; - sg_routing_edge_t value1; - sg_routing_edge_t value2; + sg_netcard_t value1; + sg_netcard_t value2; const SD_workstation_t *hosts; const SD_link_t *links; @@ -116,7 +116,7 @@ int main(int argc, char **argv) if (parse_cmdline(&timings, &downgrade, &platformFile, argc, argv) || !platformFile) { xbt_die("Invalid command line arguments: expected [--timings|--downgrade] platformFile"); } - + XBT_DEBUG("%d,%d,%s", timings, downgrade, platformFile); if (downgrade) { @@ -147,6 +147,9 @@ int main(int argc, char **argv) SD_workstation_get_name(hosts[i]), SD_workstation_get_power(hosts[i])); props = SD_workstation_get_properties(hosts[i]); + if (SD_workstation_get_cores(hosts[i])>1) { + printf(" core=\"%d\"", SD_workstation_get_cores(hosts[i])); + } if (props && !xbt_dict_is_empty(props)) { printf(">\n"); xbt_dict_foreach(props, cursor, key, data) { @@ -180,25 +183,25 @@ int main(int argc, char **argv) SD_link_get_name(links[i]), SD_link_get_current_bandwidth(links[i]), SD_link_get_current_latency(links[i])); - if (SD_link_get_sharing_policy(links[i]) == SD_LINK_SHARED) { + if (SD_link_is_shared(links[i])) { printf("/>\n"); } else { printf(" sharing_policy=\"FATPIPE\"/>\n"); } } - - xbt_lib_foreach(host_lib, cursor_src, src, value1) // Routes from host + sg_host_t host1, host2; + xbt_dict_foreach(host_list, cursor_src, src, host1) // Routes from host { - value1 = xbt_lib_get_or_null(host_lib,src,ROUTING_HOST_LEVEL); - xbt_lib_foreach(host_lib, cursor_dst, dst, value2) //to host + value1 = sg_host_edge(sg_host_by_name(src)); + xbt_dict_foreach(host_list, cursor_dst, dst, host2) //to host { printf(" \n " ,src ,dst); xbt_dynar_t route=NULL; - value2 = xbt_lib_get_or_null(host_lib,dst,ROUTING_HOST_LEVEL); - routing_get_route_and_latency(value1,value2,&route,NULL); + value2 = sg_host_edge(sg_host_by_name(dst)); + routing_get_route_and_latency(value1, value2, &route,NULL); for(i=0;i\n"); } } - xbt_lib_foreach(host_lib, cursor_dst, dst, value2) //to host + xbt_dict_foreach(host_list, cursor_dst, dst, value2) //to host { printf(" \n " ,src, dst); xbt_dynar_t route=NULL; - value2 = xbt_lib_get_or_null(host_lib,dst,ROUTING_HOST_LEVEL); - routing_get_route_and_latency((sg_routing_edge_t)value1,(sg_routing_edge_t)value2,&route, NULL); + value2 = sg_host_edge(sg_host_by_name(dst)); + routing_get_route_and_latency((sg_netcard_t)value1,(sg_netcard_t)value2,&route, NULL); for(i=0;i