]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix test
authorTimo Heister <timo.heister@gmail.com>
Tue, 22 Oct 2019 20:33:50 +0000 (22:33 +0200)
committerTimo Heister <timo.heister@gmail.com>
Tue, 22 Oct 2019 20:36:04 +0000 (22:36 +0200)
tests/mpi/communicator_duplicated.cc

index 00b2c0729051ac968cef0901d81c80de0d1ef64f..e86c069da7168e139774eaa15d4f4d9ff0aa4228 100644 (file)
@@ -35,12 +35,14 @@ test(const MPI_Comm comm)
 
   if (my_rank == 1)
     {
-      int value[3] = {1, 2, 3};
-      int dest     = 0;
-
-      MPI_Send(&value[0], 1, MPI_UNSIGNED, dest, tag, comm);
-      MPI_Send(&value[1], 1, MPI_UNSIGNED, dest, tag, comm2);
-      MPI_Send(&value[2], 1, MPI_UNSIGNED, dest, tag, *pcomm3);
+      int         value[3] = {1, 2, 3};
+      int         dest     = 0;
+      MPI_Request requests[3];
+
+      MPI_Isend(&value[0], 1, MPI_UNSIGNED, dest, tag, comm, &requests[0]);
+      MPI_Isend(&value[1], 1, MPI_UNSIGNED, dest, tag, comm2, &requests[1]);
+      MPI_Isend(&value[2], 1, MPI_UNSIGNED, dest, tag, *pcomm3, &requests[2]);
+      MPI_Waitall(3, requests, MPI_STATUSES_IGNORE);
     }
 
   if (my_rank == 0)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.