]> AND Public Git Repository - simgrid.git/blobdiff - src/plugins/vm/s4u_VirtualMachine.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
downgrade message to info level, it's usually not a big issue to have some handles...
[simgrid.git] / src / plugins / vm / s4u_VirtualMachine.cpp
index f1bc4f79b6a6cc0f088d7ce1c98cfd937bf79457..3b412c8890e3cb3ed9a74b8e1a8963f9ee3f9eee 100644 (file)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2015-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "simgrid/Exception.hpp"
+#include "simgrid/kernel/routing/NetPoint.hpp"
 #include "simgrid/s4u/Actor.hpp"
 #include "simgrid/vm.h"
 #include "src/include/surf/surf.hpp"
@@ -41,7 +42,7 @@ VirtualMachine::VirtualMachine(const std::string& name, s4u::Host* physical_host
   for (int i = 0; i < physical_host->get_pstate_count(); i++)
     speeds.push_back(physical_host->get_pstate_speed(i));
 
-  surf_cpu_model_vm->create_cpu(this, speeds, core_amount);
+  physical_host->get_netpoint()->get_englobing_zone()->get_cpu_vm_model()->create_cpu(this, speeds)->set_core_count(core_amount)->seal();
   if (physical_host->get_pstate() != 0)
     set_pstate(physical_host->get_pstate());