X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4f2d08b0ae4625d32890dc4613e1d842ad0f7b77..e66e87487bfdc40a6ae3e40e83d36e49b17bb311:/src/surf/ptask_L07.cpp diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 5943f79ddb..1bf76de1f0 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -187,9 +187,11 @@ L07Action::L07Action(kernel::resource::Model* model, int host_nb, sg_host_t* hos if (latency_ > 0) model->get_maxmin_system()->update_variable_weight(get_variable(), 0.0); - if (flops_amount != nullptr) - for (int i = 0; i < host_nb; i++) - model->get_maxmin_system()->expand(host_list[i]->pimpl_cpu->get_constraint(), get_variable(), flops_amount[i]); + /* Expend 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 (int i = 0; i < host_nb; i++) + model->get_maxmin_system()->expand(host_list[i]->pimpl_cpu->get_constraint(), get_variable(), + (flops_amount == nullptr ? 0.0 : flops_amount[i])); if (bytes_amount != nullptr) { for (int i = 0; i < host_nb; i++) {