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.
#ifdef HAVE_TRACING
TRACE_smpi_testing_out(rank);
#endif
-
+ }
log_timed_action (action, clock);
}
}
void *send = smpi_get_tmp_sendbuffer(send_size* smpi_datatype_size(MPI_CURRENT_TYPE));
void *recv = NULL;
-
- int root=atoi(action[4]);
+ int root=0;
+ if(action[4])
+ root=atoi(action[4]);
int rank = smpi_comm_rank(MPI_COMM_WORLD);
if(rank==root)