if(size == 0) {
xbt_fifo_free(fifo);
xbt_dict_remove(gap_lookup, action->sender.link_name);
- size = xbt_dict_size(gap_lookup);
+ size = xbt_dict_length(gap_lookup);
if(size == 0) {
xbt_dict_free(&gap_lookup);
}
}
#ifdef HAVE_TRACING
if (TRACE_is_enabled()) {
- xbt_dynar_t route = global_routing->get_route(action->src_name,
- action->dst_name);
+ xbt_dynar_t route = routing_get_route(action->src_name, action->dst_name);
link_CM02_t link;
unsigned int i;
xbt_dynar_foreach(route, i, link) {
xbt_dynar_t back_route = NULL;
int constraints_per_variable = 0;
xbt_dynar_t route;
- // I will need this route for some time so require for no cleanup
- global_routing->get_route_latency(src_name, dst_name, &route, &latency, 0);
+ // I need to have the forward and backward routes at the same time, so I don't ask the routing to cleanup the route right away for me
+ routing_get_route_and_latency(src_name, dst_name, &route, &latency, 0);
if (sg_network_fullduplex == 1) {
- back_route = global_routing->get_route(dst_name, src_name);
+ back_route = routing_get_route(dst_name, src_name);
}
/* LARGE PLATFORMS HACK:
(link->lmm_resource.power.peak * link->lmm_resource.power.scale);
if (bandwidth_bound < 0.0)
bandwidth_bound =
- (*bandwidth_factor_callback) (size) *
+ bandwidth_factor_callback(size) *
(link->lmm_resource.power.peak * link->lmm_resource.power.scale);
else
bandwidth_bound =
min(bandwidth_bound,
- (*bandwidth_factor_callback) (size) *
+ bandwidth_factor_callback(size) *
(link->lmm_resource.power.peak *
link->lmm_resource.power.scale));
}
/* LARGE PLATFORMS HACK:
Add src->link and dst->link latencies */
action->lat_current = action->latency;
- action->latency *= (*latency_factor_callback) (size);
+ action->latency *= latency_factor_callback(size);
action->rate =
- (*bandwidth_constraint_callback) (action->rate, bandwidth_bound,
+ bandwidth_constraint_callback(action->rate, bandwidth_bound,
size);
if(xbt_dynar_length(route) > 0) {
static xbt_dynar_t net_get_route(const char *src, const char *dst)
{
- return global_routing->get_route(src, dst);
+ return routing_get_route(src, dst);
}
static double net_get_link_bandwidth(const void *link)
surf_model_exit(surf_network_model);
surf_network_model = NULL;
- global_routing->finalize();
-
lmm_system_free(network_maxmin_system);
network_maxmin_system = NULL;
}
498000000, NULL,
0.000015, NULL,
SURF_RESOURCE_ON, NULL,
- SURF_LINK_FATPIPE, NULL),
- net_get_link_latency);
+ SURF_LINK_FATPIPE, NULL));
}
xbt_cfg_setdefault_double(_surf_cfg_set, "network/sender_gap", 10e-6);
xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
- update_model_description(surf_network_model_description,
- "SMPI", surf_network_model);
}
/************************************************************************/
0.92);
xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
- update_model_description(surf_network_model_description,
- "LV08_fullupdate", surf_network_model);
}
/***************************************************************************/
net_define_callbacks();
xbt_dynar_push(model_list, &surf_network_model);
network_solve = lmm_solve;
-
- update_model_description(surf_network_model_description,
- "CM02", surf_network_model);
}
void surf_network_model_init_Reno(void)
xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
0.92);
xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
-
- update_model_description(surf_network_model_description,
- "Reno", surf_network_model);
}
0.92);
xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S_parameter",
8775);
-
- update_model_description(surf_network_model_description,
- "Reno2", surf_network_model);
}
void surf_network_model_init_Vegas(void)
xbt_cfg_setdefault_double(_surf_cfg_set, "network/bandwidth_factor",
0.92);
xbt_cfg_setdefault_double(_surf_cfg_set, "network/weight_S", 8775);
-
- update_model_description(surf_network_model_description,
- "Vegas", surf_network_model);
}