X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4bb5b0cce7c4e83bd911d4b46c02d041815b3819..f1bd31066023cb1d8f893c4a9396bde53bc769f4:/src/smpi/internals/smpi_replay.cpp diff --git a/src/smpi/internals/smpi_replay.cpp b/src/smpi/internals/smpi_replay.cpp index 14c1bff8e0..0b9995cd5f 100644 --- a/src/smpi/internals/smpi_replay.cpp +++ b/src/smpi/internals/smpi_replay.cpp @@ -432,7 +432,7 @@ void SendAction::kernel(simgrid::xbt::ReplayAction& action) if (name == "send") { Request::send(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD); - } else if (name == "Isend") { + } else if (name == "isend") { MPI_Request request = Request::isend(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD); req_storage.add(request); } else { @@ -458,13 +458,13 @@ void RecvAction::kernel(simgrid::xbt::ReplayAction& action) if (name == "recv") { Request::recv(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD, &status); - } else if (name == "Irecv") { + } else if (name == "irecv") { MPI_Request request = Request::irecv(nullptr, args.size, args.datatype1, args.partner, args.tag, MPI_COMM_WORLD); req_storage.add(request); } TRACE_smpi_comm_out(my_proc_id); - // TODO: Check why this was only activated in the "recv" case and not in the "Irecv" case + // TODO: Check why this was only activated in the "recv" case and not in the "irecv" case if (name == "recv" && not TRACE_smpi_view_internals()) { TRACE_smpi_recv(src_traced, my_proc_id, args.tag); } @@ -697,7 +697,7 @@ void AllToAllVAction::kernel(simgrid::xbt::ReplayAction& action) } // Replay Namespace }} // namespace simgrid::smpi -static std::vector storage; +static std::unordered_map storage; /** @brief Only initialize the replay, don't do it for real */ void smpi_replay_init(int* argc, char*** argv) { @@ -706,7 +706,9 @@ void smpi_replay_init(int* argc, char*** argv) smpi_process()->set_replaying(true); int my_proc_id = simgrid::s4u::this_actor::get_pid(); - storage.resize(smpi_process_count()); + for (int i = 0; i < smpi_process_count(); i++) { + storage[i] = simgrid::smpi::replay::RequestStorage(); + } TRACE_smpi_init(my_proc_id); TRACE_smpi_computing_init(my_proc_id); @@ -718,9 +720,9 @@ void smpi_replay_init(int* argc, char*** argv) 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("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("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); });