Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SGpp] make ROUTING_HOST_LEVEL private. That was painful
[simgrid.git] / teshsuite / simdag / platforms / flatifier.c
index e0762b0..2e32367 100644 (file)
@@ -15,7 +15,7 @@
 #include <math.h>
 
 
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
 #include "xbt/log.h"
 #include "xbt/dict.h"
 #include "xbt/ex.h"
@@ -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) {
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
           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");
@@ -193,14 +193,14 @@ int main(int argc, char **argv)
 
     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++)
         {
@@ -263,7 +263,7 @@ int main(int argc, char **argv)
           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++)
           {