Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make trace_connect_list_host_speed private as it should
[simgrid.git] / src / surf / surfxml_parseplatf.cpp
index 5a9ea0e..51ce41a 100644 (file)
@@ -114,7 +114,7 @@ void sg_platf_trace_connect(sg_platf_trace_connect_cbarg_t trace_connect)
 static int after_config_done;
 void parse_after_config() {
   if (!after_config_done) {
 static int after_config_done;
 void parse_after_config() {
   if (!after_config_done) {
-         TRACE_start();
+    TRACE_start();
 
     /* Register classical callbacks */
     storage_register_callbacks();
 
     /* Register classical callbacks */
     storage_register_callbacks();
@@ -191,6 +191,17 @@ void parse_platform_file(const char *file)
 
       cpu->set_state_trace(trace);
     }
 
       cpu->set_state_trace(trace);
     }
+    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);
+      xbt_assert(trace, "Trace %s undefined", trace_name);
+
+      simgrid::s4u::Host *host = sg_host_by_name(elm);
+      xbt_assert(host, "Host %s undefined", elm);
+      simgrid::surf::Cpu *cpu = host->pimpl_cpu;
+
+      cpu->set_speed_trace(trace);
+    }
+
 
     /* Free my data */
     xbt_dict_free(&trace_connect_list_host_avail);
 
     /* Free my data */
     xbt_dict_free(&trace_connect_list_host_avail);