Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill the useless _MSG_process_create_with_env_from_SIMIX(). _MSG_process_create_from_...
[simgrid.git] / src / surf / cpu.c
index 1f01028..c14f6cc 100644 (file)
@@ -13,7 +13,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu, surf,
 surf_cpu_model_t surf_cpu_model = NULL;
 lmm_system_t cpu_maxmin_system = NULL;
 
-xbt_dict_t cpu_set;
+xbt_dict_t cpu_set = NULL;
 
 static void cpu_free(void *cpu)
 {
@@ -81,8 +81,8 @@ static void parse_cpu_init(void)
   surf_parse_get_trace(&state_trace, A_surfxml_host_state_file); 
 
   current_property_set = xbt_dict_new();
-  cpu_new(A_surfxml_host_id, power_scale, power_initial, power_trace, state_initial,
-         state_trace, /*add the properties*/ current_property_set);
+  cpu_new(xbt_strdup(A_surfxml_host_id), power_scale, power_initial, power_trace, state_initial,
+         state_trace,  current_property_set);
 
 }
 
@@ -426,7 +426,7 @@ static void surf_cpu_model_init_internal(void)
   surf_cpu_model->extension_public->get_available_speed =
       get_available_speed;
   /*manage the properties of the cpu*/
-  surf_cpu_model->common_public->get_cpu_properties = get_properties;
+  surf_cpu_model->common_public->get_properties = get_properties;
 
   if(!cpu_set) cpu_set = xbt_dict_new();
   if (!cpu_maxmin_system) cpu_maxmin_system = lmm_system_new();