-/* Copyright (c) 2008-2014. 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
#include <math.h>
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "xbt/log.h"
#include "xbt/dict.h"
#include "xbt/ex.h"
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) {
SD_workstation_get_power(hosts[i]));
props = SD_workstation_get_properties(hosts[i]);
if (SD_workstation_get_cores(hosts[i])>1) {
- printf(" cores=\"%d\"", SD_workstation_get_cores(hosts[i]));
+ printf(" core=\"%d\"", SD_workstation_get_cores(hosts[i]));
}
if (props && !xbt_dict_is_empty(props)) {
printf(">\n");
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
{
- value1 = xbt_lib_get_or_null(host_lib,src,ROUTING_HOST_LEVEL);
+ value1 = sg_host_edge(sg_host_by_name(src));
xbt_lib_foreach(host_lib, cursor_dst, dst, value2) //to host
{
printf(" <route src=\"%s\" dst=\"%s\">\n "
,src
,dst);
xbt_dynar_t route=NULL;
- value2 = xbt_lib_get_or_null(host_lib,dst,ROUTING_HOST_LEVEL);
+ value2 = sg_host_edge(sg_host_by_name(dst));
routing_get_route_and_latency(value1,value2,&route,NULL);
for(i=0;i<xbt_dynar_length(route) ;i++)
{
printf(" <route src=\"%s\" dst=\"%s\">\n "
,src, dst);
xbt_dynar_t route=NULL;
- value2 = xbt_lib_get_or_null(host_lib,dst,ROUTING_HOST_LEVEL);
+ value2 = sg_host_edge(sg_host_by_name(dst));
routing_get_route_and_latency((sg_routing_edge_t)value1,(sg_routing_edge_t)value2,&route, NULL);
for(i=0;i<xbt_dynar_length(route) ;i++)
{