Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] removing obsolete code (host and link declaration is in instr_routing.c)
[simgrid.git] / src / surf / surf_routing.c
index 1e3ba3d..6d6bec9 100644 (file)
@@ -289,9 +289,6 @@ static void parse_S_router(void)
   info->rc_type = SURF_NETWORK_ELEMENT_ROUTER;
   xbt_dict_set(global_routing->where_network_elements, A_surfxml_router_id,
                (void *) info, xbt_free);
-#ifdef HAVE_TRACING
-  TRACE_surf_host_declaration(A_surfxml_router_id, 0);
-#endif
   if (strcmp(A_surfxml_router_coordinates,"")) {
        xbt_dynar_t ctn = xbt_str_split_str(A_surfxml_router_coordinates, " ");
        xbt_dynar_shrink(ctn,0);
@@ -1111,6 +1108,10 @@ void routing_model_create(size_t size_of_links, void *loopback, double_f_cpvoid_
                                           &routing_parse_Sconfig);
   surfxml_add_callback(ETag_surfxml_config_cb_list,
                                           &routing_parse_Econfig);
+
+#ifdef HAVE_TRACING
+  instr_routing_define_callbacks();
+#endif
 }
 
 /* ************************************************************************** */
@@ -3266,8 +3267,6 @@ static void routing_parse_Scluster(void)
   char *cluster_state_file = A_surfxml_cluster_state_file;
   char *host_id, *groups, *link_id = NULL;
   char *router_id, *link_router, *link_backbone;
-  char *host_availability_file = NULL;
-  char *host_state_file = NULL;
   char *availability_file = bprintf("%s",cluster_availability_file);
   char *state_file = bprintf("%s",cluster_state_file);
 
@@ -3615,6 +3614,8 @@ static void routing_parse_Speer(void)
   char *peer_bw_out = A_surfxml_peer_bw_out;
   char *peer_lat = A_surfxml_peer_lat;
   char *peer_coord = A_surfxml_peer_coordinates;
+  char *peer_state_file = A_surfxml_peer_state_file;
+  char *peer_availability_file = A_surfxml_peer_availability_file;
 
   char *host_id = NULL;
   char *router_id, *link_router, *link_backbone, *link_id_up, *link_id_down;
@@ -3662,8 +3663,8 @@ static void routing_parse_Speer(void)
   SURFXML_BUFFER_SET(host_id, host_id);
   SURFXML_BUFFER_SET(host_power, peer_power);
   SURFXML_BUFFER_SET(host_availability, "1.0");
-  SURFXML_BUFFER_SET(host_availability_file, "");
-  SURFXML_BUFFER_SET(host_state_file, "");
+  SURFXML_BUFFER_SET(host_availability_file, peer_availability_file);
+  SURFXML_BUFFER_SET(host_state_file, peer_state_file);
   SURFXML_START_TAG(host);
   SURFXML_END_TAG(host);