Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Request should not be null here.
[simgrid.git] / src / smpi / smpi_replay.c
index 4507d52..bdb7654 100644 (file)
@@ -334,8 +334,9 @@ static void action_wait(const char *const *action){
       "action wait not preceded by any irecv: %s",
       xbt_str_join_array(action," "));
   request = xbt_dynar_pop_as(globals->irecvs,MPI_Request);
+  xbt_assert(request != NULL, "found null request in globals->irecv");
 #ifdef HAVE_TRACING
-  int rank = request && request->comm != MPI_COMM_NULL
+  int rank = request->comm != MPI_COMM_NULL
       ? smpi_comm_rank(request->comm)
       : -1;
 
@@ -719,8 +720,11 @@ smpi_mpi_gatherv(send, send_size, MPI_CURRENT_TYPE,
 #endif
 
   log_timed_action (action, clock);
+  xbt_free(recvcounts);
   xbt_free(send);
   xbt_free(recv);
+  xbt_free(disps);
+
 }
 
 static void action_reducescatter(const char *const *action) {
@@ -783,7 +787,8 @@ static void action_reducescatter(const char *const *action) {
 #ifdef HAVE_TRACING
   TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
 #endif
-
+  xbt_free(recvcounts);
+  xbt_free(disps);
   log_timed_action (action, clock);
 }