From 5a1394fa458b4eede6a409ad6befd5e29fb21094 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Tue, 22 Oct 2019 22:33:50 +0200 Subject: [PATCH] fix test --- tests/mpi/communicator_duplicated.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/mpi/communicator_duplicated.cc b/tests/mpi/communicator_duplicated.cc index 00b2c07290..e86c069da7 100644 --- a/tests/mpi/communicator_duplicated.cc +++ b/tests/mpi/communicator_duplicated.cc @@ -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) -- 2.39.5