X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5679feeea5b84a6058073ce48ddfbc5be9f23e54..c912b7d6e75473bd05731ccf77f3e2d82afb7802:/src/surf/workstation_ptask_L07.c diff --git a/src/surf/workstation_ptask_L07.c b/src/surf/workstation_ptask_L07.c index 714590bab1..b8ecc23cd8 100644 --- a/src/surf/workstation_ptask_L07.c +++ b/src/surf/workstation_ptask_L07.c @@ -26,8 +26,8 @@ typedef struct cpu_L07 { double power_scale; double power_current; tmgr_trace_event_t power_event; - e_surf_resource_state_t state_current; tmgr_trace_event_t state_event; + e_surf_resource_state_t state_current; int id; /* cpu and network card are a single object... */ } s_cpu_L07_t, *cpu_L07_t; @@ -81,11 +81,11 @@ static void ptask_update_action_bound(surf_action_workstation_L07_t action) for (i = 0; i < workstation_nb; i++) { for (j = 0; j < workstation_nb; j++) { - xbt_dynar_t route; + xbt_dynar_t route=NULL; routing_get_route_and_latency(surf_resource_name (action->workstation_list[i]), surf_resource_name(action->workstation_list[j]), - &route, NULL,1); + &route, NULL); // FIXME do we really need to recompute the latency here? double lat = 0.0; @@ -462,11 +462,11 @@ static surf_action_t ptask_execute_parallel_task(int workstation_nb, for (i = 0; i < workstation_nb; i++) { for (j = 0; j < workstation_nb; j++) { link_L07_t link; - xbt_dynar_t route; + xbt_dynar_t route=NULL; routing_get_route_and_latency( surf_resource_name(workstation_list[i]), surf_resource_name(workstation_list[j]), - &route,NULL,1); // FIXME: do we want to recompute the latency? + &route,NULL); // FIXME: do we want to recompute the latency? double lat = 0.0; if (communication_amount[i * workstation_nb + j] > 0) @@ -516,11 +516,11 @@ static surf_action_t ptask_execute_parallel_task(int workstation_nb, for (i = 0; i < workstation_nb; i++) { for (j = 0; j < workstation_nb; j++) { link_L07_t link; - xbt_dynar_t route; + xbt_dynar_t route=NULL; routing_get_route_and_latency( surf_resource_name(workstation_list[i]), surf_resource_name(workstation_list[j]), - &route,NULL,1); + &route,NULL); if (communication_amount[i * workstation_nb + j] == 0.0) continue; @@ -591,10 +591,10 @@ static surf_action_t ptask_action_sleep(void *cpu, double duration) static xbt_dynar_t ptask_get_route(void *src, void *dst) // FIXME: kill that callback kind? { - xbt_dynar_t route; + xbt_dynar_t route=NULL; routing_get_route_and_latency( surf_resource_name(src), surf_resource_name(dst), - &route,NULL,1); + &route,NULL); return route; } @@ -729,7 +729,7 @@ static void ptask_parse_link_init(sg_platf_link_cbarg_t link) link->properties); xbt_free(link_id); link_id = bprintf("%s_DOWN", link->id); - ptask_link_create_resource(bprintf("%s_DOWN", link->id), + ptask_link_create_resource(link_id, link->bandwidth, link->bandwidth_trace, link->latency,