XBT_LOG_NEW_DEFAULT_SUBCATEGORY(res_vm, ker_resource, "Virtual Machines, containing actors and mobile across hosts");
-void surf_vm_model_init_HL13(simgrid::kernel::resource::CpuModel* cpu_pm_model)
+void surf_vm_model_init_HL13()
{
+ auto* cpu_pm_model = simgrid::s4u::Engine::get_instance()->get_netzone_root()->get_impl()->get_cpu_pm_model().get();
auto vm_model = std::make_shared<simgrid::kernel::resource::VMModel>("VM_HL13");
auto* engine = simgrid::kernel::EngineImpl::get_instance();
namespace simgrid::kernel::routing {
-/* Pick the right models for CPU, net and host, and call their model_init_preparse */
-static void surf_config_models_setup()
-{
- simgrid_host_models().init_from_flag_value();
-
- XBT_DEBUG("Call vm_model_init");
- /* TODO: ideally we should get back the pointer to CpuModel from init(), but this
- * requires changing the declaration of the ModuleGroup returned by simgrid_cpu_models() */
- surf_vm_model_init_HL13(
- simgrid::s4u::Engine::get_instance()->get_netzone_root()->get_impl()->get_cpu_pm_model().get());
-}
-
xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
std::vector<kernel::resource::StandardLinkImpl*> const& link_list)>
* (FIXME: check it out by creating a file beginning with one of these tags)
* but cluster and peer come down to zone creations, so putting this verification here is correct.
*/
- surf_config_models_setup();
+ simgrid_host_models().init_from_flag_value();
+ surf_vm_model_init_HL13();
}
xbt_enforce(nullptr == engine->netpoint_by_name_or_null(get_name()),
return (fabs(value1 - value2) < precision);
}
-/** @ingroup SURF_models
- * @brief Initializes the VM model used in the platform
- *
- * A VM model depends on the physical CPU model to share the resources inside the VM
- * It will also creates the CPU model for actions running inside the VM
- *
- */
-XBT_PUBLIC void surf_vm_model_init_HL13(simgrid::kernel::resource::CpuModel* cpu_pm_model);
+XBT_PUBLIC void surf_vm_model_init_HL13();
/* --------------------
* Model Descriptions