Browse Source

Wait for mpi_isend terminations in bcast_bench

Required when the MPI backend is used.
Philippe SWARTVAGHER 4 years ago
parent
commit
5e9bfabafd
1 changed files with 5 additions and 0 deletions
  1. 5 0
      mpi/examples/benchs/bcast_bench.c

+ 5 - 0
mpi/examples/benchs/bcast_bench.c

@@ -143,6 +143,11 @@ static void dummy_loop(int nb_dest_nodes, starpu_data_handle_t data_handle, int
       starpu_mpi_isend(data_handle, &reqs[i-1], i, data_tag, MPI_COMM_WORLD);
     }
 
+    for (i = 0; i < nb_dest_nodes; i++)
+    {
+      starpu_mpi_wait(&reqs[i], MPI_STATUS_IGNORE);
+    }
+
     for (int i = 1; i <= nb_dest_nodes; i++)
     {
       starpu_variable_data_register(&time_handle, STARPU_MAIN_RAM, (uintptr_t) &t_end, sizeof(double));