Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix crashing ns3 example. Not sure if it is correct.
[simgrid.git] / src / surf / ptask_L07.cpp
index ea60e12d5804ebe6661b6743cf863d1282e0ed81..d1f2593df1322e9dbf7e89a53bb049969f0bf67c 100644 (file)
@@ -144,7 +144,7 @@ kernel::resource::CpuAction* HostL07Model::execute_parallel(const std::vector<s4
 
 L07Action::L07Action(kernel::resource::Model* model, const std::vector<s4u::Host*>& host_list,
                      const double* flops_amount, const double* bytes_amount, double rate)
-    : CpuAction(model, 1, 0), computationAmount_(flops_amount), communicationAmount_(bytes_amount), rate_(rate)
+    : CpuAction(model, 1.0, false), computationAmount_(flops_amount), communicationAmount_(bytes_amount), rate_(rate)
 {
   size_t link_nb      = 0;
   size_t used_host_nb = 0; /* Only the hosts with something to compute (>0 flops) are counted) */
@@ -295,7 +295,7 @@ void CpuL07::on_speed_change()
 
   get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(), speed_.peak * speed_.scale);
   while ((var = get_constraint()->get_variable(&elem))) {
-    const kernel::resource::Action* action = static_cast<kernel::resource::Action*>(var->get_id());
+    const kernel::resource::Action* action = var->get_id();
 
     get_model()->get_maxmin_system()->update_variable_bound(action->get_variable(), speed_.scale * speed_.peak);
   }