From: degomme Date: Thu, 30 Oct 2014 14:56:48 +0000 (+0100) Subject: previous commit was a mistake. Handle the case more gracefully. X-Git-Tag: v3_12~732^2~274 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/70bd15b5f978a4ac19768b1dbc5e111e0e76586c previous commit was a mistake. Handle the case more gracefully. --- diff --git a/src/smpi/smpi_replay.c b/src/smpi/smpi_replay.c index 685f7f3b42..682a49fdbd 100644 --- a/src/smpi/smpi_replay.c +++ b/src/smpi/smpi_replay.c @@ -351,26 +351,29 @@ static void action_test(const char *const *action){ int flag = TRUE; request = xbt_dynar_pop_as(reqq[smpi_process_index()],MPI_Request); - xbt_assert(request != NULL, "found null request in reqq"); - + //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. + if(request){ #ifdef HAVE_TRACING int rank = smpi_process_index(); instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1); extra->type=TRACING_TEST; TRACE_smpi_testing_in(rank, extra); #endif - flag = smpi_mpi_test(&request, &status); + + flag = smpi_mpi_test(&request, &status); + XBT_DEBUG("MPI_Test result: %d", flag); /* push back request in dynar to be caught by a subsequent wait. if the test * did succeed, the request is now NULL. */ - if(request) xbt_dynar_push_as(reqq[smpi_process_index()],MPI_Request, request); #ifdef HAVE_TRACING TRACE_smpi_testing_out(rank); #endif - + } log_timed_action (action, clock); }