Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Energy, onHostDestruction: ensured ptr existence
[simgrid.git] / examples / simdag / metaxml / sd_meta.c
index 9cb6620..2b3da2a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2014. The SimGrid Team.
+/* Copyright (c) 2007-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -23,14 +23,14 @@ int main(int argc, char **argv)
 {
 
   const char *platform_file;
-  const SD_workstation_t *workstations;
+  const sg_host_t *workstations;
   int ws_nr;
-  SD_workstation_t w1 = NULL;
-  SD_workstation_t w2 = NULL;
+  sg_host_t w1 = NULL;
+  sg_host_t w2 = NULL;
   const char *name1, *name2;
   int i, j, k;
 
-  /* initialisation of SD */
+  /* SD initialization */
   SD_init(&argc, argv);
 
   /*  xbt_log_control_set("sd.thres=debug"); */
@@ -46,8 +46,8 @@ int main(int argc, char **argv)
   SD_create_environment(platform_file);
 
   /* test the estimation functions */
-  workstations = SD_workstation_get_list();
-  ws_nr = SD_workstation_get_number();
+  workstations = sg_host_list();
+  ws_nr = sg_host_count();
 
 
   /* Show routes between all workstation */
@@ -58,16 +58,16 @@ int main(int argc, char **argv)
       int route_size;
       w1 = workstations[i];
       w2 = workstations[j];
-      name1 = SD_workstation_get_name(w1);
-      name2 = SD_workstation_get_name(w2);
+      name1 = sg_host_get_name(w1);
+      name2 = sg_host_get_name(w2);
       XBT_INFO("Route between %s and %s:", name1, name2);
       route = SD_route_get_list(w1, w2);
       route_size = SD_route_get_size(w1, w2);
       for (k = 0; k < route_size; k++) {
         XBT_INFO("\tLink %s: latency = %f, bandwidth = %f",
-              SD_link_get_name(route[k]),
-              SD_link_get_current_latency(route[k]),
-              SD_link_get_current_bandwidth(route[k]));
+              sg_link_name(route[k]),
+              sg_link_latency(route[k]),
+              sg_link_bandwidth(route[k]));
       }
     }
   }