Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bugfix: ptask should use expand_add for exec tasks
authorBruno Donassolo <bruno.donassolo@inria.fr>
Wed, 23 Feb 2022 10:15:18 +0000 (11:15 +0100)
committerBruno Donassolo <bruno.donassolo@inria.fr>
Mon, 7 Mar 2022 09:23:25 +0000 (10:23 +0100)
The variable in the system is the same for ptasks, so use expand_add to
reuse the element if it exists in the system. Similar as it's done for
communications

src/surf/ptask_L07.cpp

index b92dedc..2aabd5a 100644 (file)
@@ -204,8 +204,8 @@ L07Action::L07Action(Model* model, const std::vector<s4u::Host*>& host_list, con
   /* Expand it for the CPUs even if there is nothing to compute, to make sure that it gets expended even if there is no
    * communication either */
   for (size_t i = 0; i < host_list.size(); i++) {
-    model->get_maxmin_system()->expand(host_list[i]->get_cpu()->get_constraint(), get_variable(),
-                                       (flops_amount == nullptr ? 0.0 : flops_amount[i]));
+    model->get_maxmin_system()->expand_add(host_list[i]->get_cpu()->get_constraint(), get_variable(),
+                                           (flops_amount == nullptr ? 0.0 : flops_amount[i]));
   }
 
   if (bytes_amount != nullptr) {