From: Christian Heinrich Date: Fri, 13 Apr 2018 08:12:35 +0000 (+0200) Subject: [SMPI] Replay: Move TestAction to the RequestStore X-Git-Tag: v3.20~443 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5bd9b44fcc09f6139e2ed4159a1c651b83c0398c [SMPI] Replay: Move TestAction to the RequestStore --- diff --git a/src/smpi/internals/smpi_replay.cpp b/src/smpi/internals/smpi_replay.cpp index 93ab960a12..69082b3c11 100644 --- a/src/smpi/internals/smpi_replay.cpp +++ b/src/smpi/internals/smpi_replay.cpp @@ -669,8 +669,8 @@ public: TestAction(RequestStorage& storage) : ReplayAction("Test", storage) {} void kernel(simgrid::xbt::ReplayAction& action) override { - MPI_Request request = get_reqq_self()->back(); - get_reqq_self()->pop_back(); + MPI_Request request = req_storage->find(args.src, args.dst, args.tag); + req_storage->remove(request); // if request is null here, this may mean that a previous test has succeeded // Different times in traced application and replayed version may lead to this // In this case, ignore the extra calls. @@ -683,7 +683,10 @@ public: XBT_DEBUG("MPI_Test result: %d", flag); /* push back request in vector to be caught by a subsequent wait. if the test did succeed, the request is now * nullptr.*/ - get_reqq_self()->push_back(request); + if (request == MPI_REQUEST_NULL) + req_storage->addNullRequest(args.src, args.dst, args.tag); + else + req_storage->add(request); TRACE_smpi_testing_out(my_proc_id); }