-/* Copyright (c) 2014-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2014-2023. 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. */
simgrid::config::set_default<double>("network/weight-S", 8775);
}
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
void NetworkIBModel::IB_create_host_callback(s4u::Host const& host)
{
ibModel->update_IB_factors(action, act_src, act_dst, 0);
}
-NetworkIBModel::NetworkIBModel(const std::string& name) : NetworkSmpiModel(name)
+NetworkIBModel::NetworkIBModel(const std::string& name) : NetworkCm02Model(name)
{
std::string IB_factors_string = config::get_value<std::string>("smpi/IB-penalty-factors");
std::vector<std::string> radical_elements;
for (ActiveComm* comm : root->active_comms_up_) {
// compute inbound penalty
double my_penalty_in = 1.0;
- int nb_comms = comm->destination->nb_active_comms_down_; // total number of incoming comms
- if (nb_comms != 1)
+ if (comm->destination->nb_active_comms_down_ != 1) // total number of incoming comms
my_penalty_in = (comm->destination->active_comms_down_)[root] // number of comm sent to dest by root node
* Be_ * comm->destination->active_comms_down_.size(); // number of different nodes sending to dest
to->active_comms_down_[from] -= 1;
to->nb_active_comms_down_--;
- auto it = std::find_if(begin(from->active_comms_up_), end(from->active_comms_up_),
- [action](const ActiveComm* comm) { return comm->action == action; });
- if (it != std::end(from->active_comms_up_)) {
+ if (auto it = std::find_if(begin(from->active_comms_up_), end(from->active_comms_up_),
+ [action](const ActiveComm* comm) { return comm->action == action; });
+ it != std::end(from->active_comms_up_)) {
delete *it;
from->active_comms_up_.erase(it);
}
update_IB_factors_rec(from, updated);
XBT_DEBUG("IB - Finished updating %d", from->id_);
}
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource