Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please codefactor
[simgrid.git] / src / smpi / plugins / sampi_loadbalancer.cpp
index 59f5914..5e928f2 100644 (file)
@@ -93,7 +93,7 @@ public:
       // Update the process and host mapping in SimGrid.
       XBT_DEBUG("Migrating process %li from %s to %s", my_proc_id, cur_host->get_cname(), migrate_to_host->get_cname());
       TRACE_smpi_process_change_host(my_proc_id, migrate_to_host);
-      simgrid::s4u::this_actor::migrate(migrate_to_host);
+      simgrid::s4u::this_actor::set_host(migrate_to_host);
     }
 
     smpilb_bar.wait();
@@ -136,9 +136,8 @@ void sg_load_balancer_plugin_init()
   static bool done = false;
   if (!done) {
     done = true;
-    simgrid::kernel::activity::ExecImpl::on_completion.connect([](simgrid::kernel::activity::ExecImpl const& activity) {
-      simgrid::smpi::plugin::lb.record_actor_computation(activity.simcalls_.front()->issuer_->iface(),
-                                                         activity.surf_action_->get_cost());
+    simgrid::s4u::Exec::on_completion.connect([](simgrid::s4u::Actor const& actor, simgrid::s4u::Exec const& exec) {
+      simgrid::smpi::plugin::lb.record_actor_computation(actor, exec.get_cost());
     });
 
     xbt_replay_action_register(