Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix some SMPI+MC bugs
authorAugustin Degomme <degomme@idpann.imag.fr>
Thu, 6 Feb 2014 16:59:15 +0000 (17:59 +0100)
committerAugustin Degomme <degomme@idpann.imag.fr>
Thu, 6 Feb 2014 17:13:57 +0000 (18:13 +0100)
src/simix/smx_network.c
src/smpi/smpi_base.c
src/smpi/smpi_global.c

index 0de05fa..ab44443 100644 (file)
@@ -445,7 +445,7 @@ smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
 
   if (MC_is_active()) {
     other_action->state = SIMIX_RUNNING;
-    return other_action;
+    return (detached ? NULL : other_action);
   }
 
   SIMIX_comm_start(other_action);
index 9109101..2d6a64b 100644 (file)
@@ -764,12 +764,11 @@ void smpi_mpi_wait(MPI_Request * request, MPI_Status * status)
 
   if ((*request)->action != NULL) { // this is not a detached send
     simcall_comm_wait((*request)->action, -1.0);
-  }
-
 #ifdef HAVE_MC
   if(MC_is_active())
     (*request)->action->comm.dst_data = NULL; // dangling pointer : dst_data is freed with a wait, need to set it to NULL for system state comparison
 #endif
+  }
 
   finish_wait(request, status);
   *request = MPI_REQUEST_NULL;
index 0339c33..0ff30a4 100644 (file)
@@ -100,6 +100,7 @@ void smpi_process_destroy(void)
 void smpi_process_finalize(void)
 {
   // wait for all pending asynchronous comms to finish
+  if(!MC_is_active())
   while (SIMIX_process_has_pending_comms(SIMIX_process_self())) {
     simcall_process_sleep(0.01);
   }