Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
No vm when ptask on
[simgrid.git] / src / surf / workstation.cpp
index 5bf2506..c6bec86 100644 (file)
@@ -30,6 +30,7 @@ void surf_workstation_model_init_current_default(void)
   xbt_cfg_setdefault_boolean(_sg_cfg_set, "network/crosstraffic", "yes");
   surf_cpu_model_init_Cas01();
   surf_network_model_init_LegrandVelho();
+  surf_workstation_model->p_cpuModel = surf_cpu_model_pm;
 
   ModelPtr model = static_cast<ModelPtr>(surf_workstation_model);
   xbt_dynar_push(model_list, &model);
@@ -51,6 +52,7 @@ void surf_workstation_model_init_compound()
 }
 
 WorkstationModel::WorkstationModel() : Model("Workstation") {
+  p_cpuModel = surf_cpu_model_pm;
 }
 
 WorkstationModel::~WorkstationModel() {
@@ -125,7 +127,7 @@ void WorkstationModel::adjustWeightOfDummyCpuActions()
 double WorkstationModel::shareResources(double now){
   adjustWeightOfDummyCpuActions();
 
-  double min_by_cpu = surf_cpu_model_pm->shareResources(now);
+  double min_by_cpu = p_cpuModel->shareResources(now);
   double min_by_net = surf_network_model->shareResources(now);
 
   XBT_DEBUG("model %p, %s min_by_cpu %f, %s min_by_net %f",