-/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2019. 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. */
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++) {