if (activity.get_host() == get_host())
pre_task();
});
- simgrid::s4u::Exec::on_completion.connect([this](simgrid::s4u::Exec const& activity) {
+ simgrid::s4u::Activity::on_completion.connect([this](simgrid::s4u::Activity& activity) {
+ const auto* exec = dynamic_cast<simgrid::s4u::Exec*>(&activity);
+ if (exec == nullptr) // Only Execs are concerned here
+ return;
// For more than one host (not yet supported), we can access the host via
// simcalls_.front()->issuer->get_iface()->get_host()
- if (activity.get_host() == get_host() && iteration_running) {
- comp_timer += activity.get_finish_time() - activity.get_start_time();
+ if (exec->get_host() == get_host() && iteration_running) {
+ comp_timer += exec->get_finish_time() - exec->get_start_time();
}
});
// FIXME I think that this fires at the same time for all hosts, so when the src sends something,
// the dst will be notified even though it didn't even arrive at the recv yet
kernel::activity::CommImpl::on_start.connect([this](const kernel::activity::CommImpl& comm) {
- auto* act = static_cast<kernel::resource::NetworkAction*>(comm.surf_action_);
+ const auto* act = static_cast<kernel::resource::NetworkAction*>(comm.surf_action_);
if ((get_host() == &act->get_src() || get_host() == &act->get_dst()) && iteration_running) {
post_task();
}