X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39b95a41ad8b79e4730e2c0b855b2a27ba1054b2..8d000a773b5ebcd411b28c31de68eeddf804e66b:/src/surf/host_ptask_L07.cpp diff --git a/src/surf/host_ptask_L07.cpp b/src/surf/host_ptask_L07.cpp index 5f77143c4e..9197c4d277 100644 --- a/src/surf/host_ptask_L07.cpp +++ b/src/surf/host_ptask_L07.cpp @@ -340,28 +340,18 @@ void HostL07Model::addTraces() xbt_dict_cursor_t cursor = NULL; char *trace_name, *elm; - if (!trace_connect_list_host_avail) + if (!trace_connect_list_host_speed) return; /* Connect traces relative to cpu */ - xbt_dict_foreach(trace_connect_list_host_avail, cursor, trace_name, elm) { + xbt_dict_foreach(trace_connect_list_host_speed, cursor, trace_name, elm) { tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name); - CpuL07 *host = static_cast(sg_host_by_name(elm)->pimpl_cpu); + Cpu *cpu = sg_host_by_name(elm)->pimpl_cpu; - xbt_assert(host, "Host %s undefined", elm); + xbt_assert(cpu, "Host %s undefined", elm); xbt_assert(trace, "Trace %s undefined", trace_name); - host->p_stateEvent = future_evt_set->add_trace(trace, 0.0, host); - } - - xbt_dict_foreach(trace_connect_list_power, cursor, trace_name, elm) { - tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name); - CpuL07 *host = static_cast(sg_host_by_name(elm)->pimpl_cpu); - - xbt_assert(host, "Host %s undefined", elm); - xbt_assert(trace, "Trace %s undefined", trace_name); - - host->p_speedEvent = future_evt_set->add_trace(trace, 0.0, host); + cpu->set_speed_trace(trace); } /* Connect traces relative to network */ @@ -375,7 +365,7 @@ void HostL07Model::addTraces() link->p_stateEvent = future_evt_set->add_trace(trace, 0.0, link); } - xbt_dict_foreach(trace_connect_list_bandwidth, cursor, trace_name, elm) { + xbt_dict_foreach(trace_connect_list_link_bw, cursor, trace_name, elm) { tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name); LinkL07 *link = static_cast(Link::byName(elm)); @@ -385,7 +375,7 @@ void HostL07Model::addTraces() link->p_bwEvent = future_evt_set->add_trace(trace, 0.0, link); } - xbt_dict_foreach(trace_connect_list_latency, cursor, trace_name, elm) { + xbt_dict_foreach(trace_connect_list_link_lat, cursor, trace_name, elm) { tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name); LinkL07 *link = static_cast(Link::byName(elm));