Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fixed bug in route:multi generation; appeared after the KCC.. model was eliminated
[simgrid.git] / src / surf / workstation_ptask_L07.c
index 730476e..d708a9e 100644 (file)
@@ -485,10 +485,8 @@ static surf_action_t execute_parallel_task(int workstation_nb,
   int nb_host = 0;
   double latency = 0.0;
 
-  if (parallel_task_link_set == NULL) {
-    parallel_task_link_set =
-       xbt_dict_new_ext(workstation_nb * workstation_nb * 10);
-  }
+  if (parallel_task_link_set == NULL)
+    parallel_task_link_set = xbt_dict_new();
 
   xbt_dict_reset(parallel_task_link_set);
 
@@ -877,7 +875,6 @@ static void parse_route_set_route(void)
   char* name;
   if (src_id != -1 && dst_id != -1) {
      name = bprintf("%x#%x",src_id, dst_id);
-
      manage_route(route_table, name, route_action, 0);
      free(name);
   }
@@ -913,6 +910,7 @@ static void add_route(void)
     char *key,*data, *end;
     const char *sep = "#";
     xbt_dynar_t links, keys;
+       char* link = NULL;
 
     if (routing_table == NULL) create_routing_table();
 
@@ -927,7 +925,7 @@ static void add_route(void)
        link_list_capacity = xbt_dynar_length(links);
        link_list = xbt_new(link_L07_t, link_list_capacity);
 
-       char* link = NULL;
+       
        xbt_dynar_foreach (links, cpt, link) {
          TRY {
            link_list[nb_link++] = xbt_dict_get(link_set, link);
@@ -937,7 +935,6 @@ static void add_route(void)
          }    
        }
        route_new(src_id, dst_id, link_list, nb_link);
-       xbt_dynar_free(&links);
    }
 
    xbt_dict_free(&route_table);
@@ -1099,8 +1096,8 @@ static void model_init_internal(void)
 
   surf_workstation_model->common_public->get_properties = get_properties;
 
-  workstation_set = xbt_dict_new_ext(1024);
-  link_set = xbt_dict_new_ext(1024);
+  workstation_set = xbt_dict_new();
+  link_set = xbt_dict_new();
 
   if (!ptask_maxmin_system)
     ptask_maxmin_system = lmm_system_new();