From: Millian Poquet Date: Thu, 31 May 2018 13:24:39 +0000 (+0200) Subject: [smpi] replay: storage var is now an ordered_map X-Git-Tag: v3_21~591^2~1^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f1bd31066023cb1d8f893c4a9396bde53bc769f4 [smpi] replay: storage var is now an ordered_map This commit is kept separate because it does not change the code semantics at all, it just changes the data structure. --- diff --git a/src/smpi/internals/smpi_replay.cpp b/src/smpi/internals/smpi_replay.cpp index 8d6b628594..0b9995cd5f 100644 --- a/src/smpi/internals/smpi_replay.cpp +++ b/src/smpi/internals/smpi_replay.cpp @@ -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);