XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network_gtnets, surf,
"Logging specific to the SURF network module");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network_gtnets, surf,
"Logging specific to the SURF network module");
link_new(name, bw, lat, current_property_set);
}
link_new(name, bw, lat, current_property_set);
}
DEBUG0("Entering add_route()");
xbt_dict_foreach(route_table, cursor, key, data) {
DEBUG0("Entering add_route()");
xbt_dict_foreach(route_table, cursor, key, data) {
nb_link = 0;
links = (xbt_dynar_t)data;
keys = xbt_str_split_str(key, sep);
nb_link = 0;
links = (xbt_dynar_t)data;
keys = xbt_str_split_str(key, sep);
- nb_link = xbt_dynar_length(links);
- link_list = xbt_realloc(link_list, (nb_link) * sizeof(network_link_GTNETS_t));
+ link_list_capacity = xbt_dynar_length(links);
+ link_list = xbt_new(network_link_GTNETS_t, link_list_capacity);
src_id = strtol(xbt_dynar_get_as(keys, 0, char*), &end, 16);
dst_id = strtol(xbt_dynar_get_as(keys, 1, char*), &end, 16);
src_id = strtol(xbt_dynar_get_as(keys, 0, char*), &end, 16);
dst_id = strtol(xbt_dynar_get_as(keys, 1, char*), &end, 16);
surfxml_add_callback(STag_surfxml_router_cb_list, &parse_route_set_routers);
surfxml_add_callback(STag_surfxml_link_cb_list, &parse_link_init);
surfxml_add_callback(STag_surfxml_route_cb_list, &parse_route_set_endpoints);
surfxml_add_callback(STag_surfxml_router_cb_list, &parse_route_set_routers);
surfxml_add_callback(STag_surfxml_link_cb_list, &parse_link_init);
surfxml_add_callback(STag_surfxml_route_cb_list, &parse_route_set_endpoints);
- surfxml_add_callback(ETag_surfxml_route_cb_list, &parse_route_set_route);
- surfxml_add_callback(ETag_surfxml_platform_cb_list, &add_route);
+ surfxml_add_callback(ETag_surfxml_route_cb_list, &parse_route_set_route);
+ surfxml_add_callback(ETag_surfxml_platform_cb_list, &add_route);
- return gtnets_get_time_to_next_flow_completion();
+ xbt_assert0(time_to_next_flow_completion, "Time to next flow completion not initialized!\n");
+
+ time_to_next_flow_completion = gtnets_get_time_to_next_flow_completion();
+
+ return time_to_next_flow_completion;
/* If there are no renning flows, just return */
if (time_to_next_flow_completion < 0.0) {
return;
/* If there are no renning flows, just return */
if (time_to_next_flow_completion < 0.0) {
return;