Forráskód Böngészése

Make sure we do not have MPI communications pending in the task graph before shutting down MPI

Samuel Thibault 5 éve
szülő
commit
46b44bcebb
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      mpi/src/starpu_mpi_init.c

+ 4 - 0
mpi/src/starpu_mpi_init.c

@@ -228,6 +228,10 @@ int starpu_mpi_shutdown(void)
 	void *value;
 	int rank, world_size;
 
+	/* Make sure we do not have MPI communications pending in the task graph
+	 * before shutting down MPI */
+	starpu_mpi_wait_for_all(MPI_COMM_WORLD);
+
 	/* We need to get the rank before calling MPI_Finalize to pass to _starpu_mpi_comm_amounts_display() */
 	starpu_mpi_comm_rank(MPI_COMM_WORLD, &rank);
 	starpu_mpi_comm_size(MPI_COMM_WORLD, &world_size);