- xbt_replay_action_register("init", simgrid::smpi::action_init);
- xbt_replay_action_register("finalize", simgrid::smpi::action_finalize);
- xbt_replay_action_register("comm_size", simgrid::smpi::action_comm_size);
- xbt_replay_action_register("comm_split", simgrid::smpi::action_comm_split);
- xbt_replay_action_register("comm_dup", simgrid::smpi::action_comm_dup);
-
- std::shared_ptr<simgrid::smpi::Replay::SendAction> isend(new simgrid::smpi::Replay::SendAction("Isend"));
- std::shared_ptr<simgrid::smpi::Replay::SendAction> send(new simgrid::smpi::Replay::SendAction("send"));
- std::shared_ptr<simgrid::smpi::Replay::RecvAction> irecv(new simgrid::smpi::Replay::RecvAction("Irecv"));
- std::shared_ptr<simgrid::smpi::Replay::RecvAction> recv(new simgrid::smpi::Replay::RecvAction("recv"));
- std::shared_ptr<simgrid::smpi::Replay::WaitAction> wait(new simgrid::smpi::Replay::WaitAction());
-
- xbt_replay_action_register("send",
- std::bind(&simgrid::smpi::Replay::SendAction::execute, send, std::placeholders::_1));
- xbt_replay_action_register("Isend",
- std::bind(&simgrid::smpi::Replay::SendAction::execute, isend, std::placeholders::_1));
- xbt_replay_action_register("recv",
- std::bind(&simgrid::smpi::Replay::RecvAction::execute, recv, std::placeholders::_1));
- xbt_replay_action_register("Irecv",
- std::bind(&simgrid::smpi::Replay::RecvAction::execute, irecv, std::placeholders::_1));
- xbt_replay_action_register("test", simgrid::smpi::action_test);
- xbt_replay_action_register("wait",
- std::bind(&simgrid::smpi::Replay::WaitAction::execute, wait, std::placeholders::_1));
- xbt_replay_action_register("waitAll", simgrid::smpi::action_waitall);
- xbt_replay_action_register("barrier", simgrid::smpi::action_barrier);
- xbt_replay_action_register("bcast", simgrid::smpi::action_bcast);
- xbt_replay_action_register("reduce", simgrid::smpi::action_reduce);
- xbt_replay_action_register("allReduce", simgrid::smpi::action_allReduce);
- xbt_replay_action_register("allToAll", simgrid::smpi::action_allToAll);
- xbt_replay_action_register("allToAllV", simgrid::smpi::action_allToAllv);
- xbt_replay_action_register("gather", simgrid::smpi::action_gather);
- xbt_replay_action_register("scatter", simgrid::smpi::action_scatter);
- xbt_replay_action_register("gatherV", simgrid::smpi::action_gatherv);
- xbt_replay_action_register("scatterV", simgrid::smpi::action_scatterv);
- xbt_replay_action_register("allGather", simgrid::smpi::action_allgather);
- xbt_replay_action_register("allGatherV", simgrid::smpi::action_allgatherv);
- xbt_replay_action_register("reduceScatter", simgrid::smpi::action_reducescatter);
- xbt_replay_action_register("compute", simgrid::smpi::action_compute);
+ xbt_replay_action_register("init", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::InitAction().execute(action); });
+ xbt_replay_action_register("finalize", [](simgrid::xbt::ReplayAction& action) { /* nothing to do */ });
+ xbt_replay_action_register("comm_size", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); });
+ xbt_replay_action_register("comm_split",[](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); });
+ xbt_replay_action_register("comm_dup", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::CommunicatorAction().execute(action); });
+ xbt_replay_action_register("send", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::SendAction("send", storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
+ xbt_replay_action_register("Isend", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::SendAction("Isend", storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
+ xbt_replay_action_register("recv", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::RecvAction("recv", storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
+ xbt_replay_action_register("Irecv", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::RecvAction("Irecv", storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
+ xbt_replay_action_register("test", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::TestAction(storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
+ xbt_replay_action_register("wait", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::WaitAction(storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
+ xbt_replay_action_register("waitall", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::WaitAllAction(storage[simgrid::s4u::this_actor::get_pid()-1]).execute(action); });
+ xbt_replay_action_register("barrier", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::BarrierAction().execute(action); });
+ xbt_replay_action_register("bcast", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::BcastAction().execute(action); });
+ xbt_replay_action_register("reduce", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ReduceAction().execute(action); });
+ xbt_replay_action_register("allreduce", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::AllReduceAction().execute(action); });
+ xbt_replay_action_register("allToAll", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::AllToAllAction().execute(action); });
+ xbt_replay_action_register("allToAllV", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::AllToAllVAction().execute(action); });
+ xbt_replay_action_register("gather", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherAction("gather").execute(action); });
+ xbt_replay_action_register("scatter", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ScatterAction().execute(action); });
+ xbt_replay_action_register("gatherv", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherVAction("gatherv").execute(action); });
+ xbt_replay_action_register("scatterv", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ScatterVAction().execute(action); });
+ xbt_replay_action_register("allgather", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherAction("allgather").execute(action); });
+ xbt_replay_action_register("allgatherv", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::GatherVAction("allgatherv").execute(action); });
+ xbt_replay_action_register("reducescatter", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ReduceScatterAction().execute(action); });
+ xbt_replay_action_register("compute", [](simgrid::xbt::ReplayAction& action) { simgrid::smpi::replay::ComputeAction().execute(action); });