X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b25ba22df3453203e67cc1de156130f15bd7d404..77db6c9bc8fa31f2915bbc77a1da62ce5e3c8da6:/src/surf/cpu_cas01.cpp diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index 7841e71b87..3c2ee5cbfa 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -37,7 +37,6 @@ static simgrid::config::Flag void surf_cpu_model_init_Cas01() { xbt_assert(surf_cpu_model_pm == nullptr, "CPU model already initialized. This should not happen."); - xbt_assert(surf_cpu_model_vm == nullptr, "CPU model already initialized. This should not happen."); if (cpu_optim_opt == "TI") { simgrid::kernel::resource::CpuTiModel::create_pm_vm_models(); @@ -51,7 +50,9 @@ void surf_cpu_model_init_Cas01() algo = simgrid::kernel::resource::Model::UpdateAlgo::FULL; surf_cpu_model_pm = new simgrid::kernel::resource::CpuCas01Model(algo); - surf_cpu_model_vm = new simgrid::kernel::resource::CpuCas01Model(algo); + models_by_type[simgrid::kernel::resource::Model::Type::CPU_PM].push_back(surf_cpu_model_pm); + auto cpu_model_vm = new simgrid::kernel::resource::CpuCas01Model(algo); + models_by_type[simgrid::kernel::resource::Model::Type::CPU_VM].push_back(cpu_model_vm); } namespace simgrid { @@ -61,7 +62,6 @@ namespace resource { CpuCas01Model::CpuCas01Model(Model::UpdateAlgo algo) : CpuModel(algo) { all_existing_models.push_back(this); - models_by_type[simgrid::kernel::resource::Model::Type::CPU].push_back(this); bool select = config::get_value("cpu/maxmin-selective-update");