Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Whitespace cleanup.
[simgrid.git] / src / surf / surf_routing.c
index 32f9bfa..f1d5ea5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2010, 2011. The SimGrid Team.
+/* Copyright (c) 2009-2013. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -19,14 +19,15 @@ xbt_lib_t host_lib;
 int ROUTING_HOST_LEVEL;         //Routing level
 int SURF_CPU_LEVEL;             //Surf cpu level
 int SURF_WKS_LEVEL;             //Surf workstation level
-int SIMIX_HOST_LEVEL;           //Simix level
-int MSG_HOST_LEVEL;             //Msg level
-int SD_HOST_LEVEL;              //Simdag level
+int SIMIX_HOST_LEVEL;           //Simix host level
+int SIMIX_STORAGE_LEVEL;        //Simix storage level
+int MSG_HOST_LEVEL;             //Msg host level
+int MSG_STORAGE_LEVEL;          //Msg storage level
+int SD_HOST_LEVEL;              //Simdag host level
+int SD_STORAGE_LEVEL;           //Simdag storage level
 int COORD_HOST_LEVEL=0;         //Coordinates level
 int NS3_HOST_LEVEL;             //host node for ns3
 
-xbt_dict_t watched_hosts_lib;
-
 /**
  * @ingroup SURF_build_api
  * @brief A library containing all known links
@@ -745,9 +746,6 @@ static void routing_parse_cabinet(sg_platf_cabinet_cbarg_t cabinet)
     s_sg_platf_host_cbarg_t host;
     memset(&host, 0, sizeof(host));
     host.initial_state = SURF_RESOURCE_ON;
-    xbt_dynar_t power_state_list = xbt_dynar_new(sizeof(double), NULL);
-    xbt_dynar_push(power_state_list,&cabinet->power);
-    host.power_peak = power_state_list;
     host.pstate = 0;
     host.power_scale = 1.0;
     host.core_amount = 1;
@@ -767,6 +765,9 @@ static void routing_parse_cabinet(sg_platf_cabinet_cbarg_t cabinet)
       link_id = bprintf("link_%s%d%s",cabinet->prefix,i,cabinet->suffix);
       host.id = host_id;
       link.id = link_id;
+      xbt_dynar_t power_state_list = xbt_dynar_new(sizeof(double), NULL);
+      xbt_dynar_push(power_state_list,&cabinet->power);
+      host.power_peak = power_state_list;
       sg_platf_new_host(&host);
       sg_platf_new_link(&link);
 
@@ -1078,6 +1079,7 @@ static void routing_parse_peer(sg_platf_peer_cbarg_t peer)
   XBT_DEBUG(" ");
 
   //xbt_dynar_free(&tab_elements_num);
+  free(router_id);
   free(host_id);
   free(link_id);
   free(link_up);