Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Bring back old code for MPI_Finalize (disabled)
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 3 Mar 2014 12:30:45 +0000 (13:30 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 3 Mar 2014 12:41:45 +0000 (13:41 +0100)
Some test (probenull) do not terminate with the new code of
MPI_Finalize.

src/smpi/smpi_global.c

index e90b83a..3bdb895 100644 (file)
@@ -100,6 +100,12 @@ void smpi_process_destroy(void)
  */
 void smpi_process_finalize(void)
 {
+#if 0
+  // wait for all pending asynchronous comms to finish
+  while (SIMIX_process_has_pending_comms(SIMIX_process_self())) {
+    simcall_process_sleep(0.01);
+  }
+#else
   int i;
   int size = smpi_comm_size(MPI_COMM_WORLD);
   int rank = smpi_comm_rank(MPI_COMM_WORLD);
@@ -131,7 +137,7 @@ void smpi_process_finalize(void)
     smpi_mpi_waitall( size-1, requests+1, MPI_STATUSES_IGNORE );
     free( requests );
   }
-
+#endif
 }
 
 /**