X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/610eb721db6930318d297090f8b931b56a675e21..7d8a6180b3769b53adbe4600df95074763141495:/src/surf/cpu_cas01.c diff --git a/src/surf/cpu_cas01.c b/src/surf/cpu_cas01.c index d8c3b4df1a..3755de922a 100644 --- a/src/surf/cpu_cas01.c +++ b/src/surf/cpu_cas01.c @@ -10,7 +10,7 @@ surf_model_t surf_cpu_model = NULL; lmm_system_t cpu_maxmin_system = NULL; e_UM_t cpu_update_mechanism = UM_UNDEFINED; -static int selective_update = 0; +static int cpu_selective_update = 0; static xbt_swag_t cpu_modified_cpu = NULL; static xbt_heap_t cpu_action_heap = NULL; @@ -650,7 +650,7 @@ static void cpu_finalize(void) if(cpu_modified_cpu) xbt_swag_free(cpu_modified_cpu); } -static void surf_cpu_model_init_internal(const char* name) +static void surf_cpu_model_init_internal() { s_surf_action_t action; s_cpu_Cas01_t cpu; @@ -660,7 +660,7 @@ static void surf_cpu_model_init_internal(const char* name) cpu_running_action_set_that_does_not_need_being_checked = xbt_swag_new(xbt_swag_offset(action, state_hookup)); - surf_cpu_model->name = name; + surf_cpu_model->name = "cpu"; surf_cpu_model->action_unref = cpu_action_unref; surf_cpu_model->action_cancel = cpu_action_cancel; @@ -702,7 +702,7 @@ static void surf_cpu_model_init_internal(const char* name) surf_cpu_model->extension.cpu.add_traces = cpu_add_traces_cpu; if (!cpu_maxmin_system) { - cpu_maxmin_system = lmm_system_new(selective_update); + cpu_maxmin_system = lmm_system_new(cpu_selective_update); } if(cpu_update_mechanism == UM_LAZY){ cpu_action_heap = xbt_heap_new(8, NULL); @@ -732,21 +732,14 @@ static void surf_cpu_model_init_internal(const char* name) void surf_cpu_model_init_Cas01() { char *optim = xbt_cfg_get_string(_surf_cfg_set, "cpu/optim"); - char *model = xbt_cfg_get_string(_surf_cfg_set, "cpu/model"); int select = xbt_cfg_get_int(_surf_cfg_set, "cpu/maxmin_selective_update"); - if(!strcmp(model,"Cas01_fullupdate")) { - XBT_WARN("[*Deprecated*. Use --cfg=cpu/model:Cas01 with option --cfg=cpu/optim:Full instead.]"); - } else if(!strcmp(model,"CpuTI")) { - XBT_WARN("[*Deprecated*. Use --cfg=cpu/model:Cas01 with option --cfg=cpu/optim:TI instead.]"); - } - if(!strcmp(optim,"Full")) { cpu_update_mechanism = UM_FULL; - selective_update = select; + cpu_selective_update = select; } else if (!strcmp(optim,"Lazy")) { cpu_update_mechanism = UM_LAZY; - selective_update = 1; + cpu_selective_update = 1; xbt_assert((select==1) || (xbt_cfg_is_default_value(_surf_cfg_set,"cpu/maxmin_selective_update")), "Disabling selective update while using the lazy update mechanism is dumb!"); } else if (!strcmp(optim,"TI")) { @@ -758,7 +751,7 @@ void surf_cpu_model_init_Cas01() if (surf_cpu_model) return; - surf_cpu_model_init_internal("CPU"); + surf_cpu_model_init_internal(); cpu_define_callbacks(); xbt_dynar_push(model_list, &surf_cpu_model); }