/* 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. */
/* 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. */
IBNode* act = new IBNode(id);
id++;
((NetworkIBModel*)surf_network_model)->active_nodes.insert({host.get_name(), act});
}
IBNode* act = new IBNode(id);
id++;
((NetworkIBModel*)surf_network_model)->active_nodes.insert({host.get_name(), act});
}
- std::pair<IBNode*,IBNode*> pair = ((NetworkIBModel*)surf_network_model)->active_comms[action];
- XBT_DEBUG("IB callback - action %p finished", action);
+ std::pair<IBNode*, IBNode*> pair = ((NetworkIBModel*)surf_network_model)->active_comms[&action];
+ XBT_DEBUG("IB callback - action %p finished", &action);
- ((NetworkIBModel*)surf_network_model)->updateIBfactors(action, pair.first, pair.second, 1);
-
- ((NetworkIBModel*)surf_network_model)->active_comms.erase(action);
+ ((NetworkIBModel*)surf_network_model)->updateIBfactors(&action, pair.first, pair.second, 1);
-static void IB_action_init_callback(simgrid::kernel::resource::NetworkAction* action, simgrid::s4u::Host* src,
+static void IB_action_init_callback(simgrid::kernel::resource::NetworkAction& action, simgrid::s4u::Host* src,
- ibModel->updateIBfactors(action, act_src, act_dst, 0);
+ ibModel->updateIBfactors(&action, act_src, act_dst, 0);
simgrid::s4u::Link::on_communication_state_change.connect(IB_action_state_changed_callback);
simgrid::s4u::Link::on_communicate.connect(IB_action_init_callback);
simgrid::s4u::Link::on_communication_state_change.connect(IB_action_state_changed_callback);
simgrid::s4u::Link::on_communicate.connect(IB_action_init_callback);
std::vector<std::string> radical_elements;
boost::split(radical_elements, IB_factors_string, boost::is_any_of(";"));
std::vector<std::string> radical_elements;
boost::split(radical_elements, IB_factors_string, boost::is_any_of(";"));
to->nbActiveCommsDown--;
for (std::vector<ActiveComm*>::iterator it = from->ActiveCommsUp.begin(); it != from->ActiveCommsUp.end(); ++it) {
if ((*it)->action == action) {
to->nbActiveCommsDown--;
for (std::vector<ActiveComm*>::iterator it = from->ActiveCommsUp.begin(); it != from->ActiveCommsUp.end(); ++it) {
if ((*it)->action == action) {
std::vector<bool> updated(active_nodes.size(), false);
updateIBfactors_rec(from, updated);
XBT_DEBUG("IB - Finished updating %d", from->id);
std::vector<bool> updated(active_nodes.size(), false);
updateIBfactors_rec(from, updated);
XBT_DEBUG("IB - Finished updating %d", from->id);