Browse Source

only the owner of the block should send it to node 0

Samuel Thibault 15 years ago
parent
commit
c05e4565d4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mpi/examples/mpi_lu/plu_solve.c

+ 1 - 1
mpi/examples/mpi_lu/plu_solve.c

@@ -256,7 +256,7 @@ TYPE *STARPU_PLU(reconstruct_matrix)(unsigned size, unsigned nblocks)
 				int ret = MPI_Recv(block, block_size*block_size, MPI_TYPE, block_rank, 0, MPI_COMM_WORLD, &status);
 				STARPU_ASSERT(ret == MPI_SUCCESS);
 			}
-			else {
+			else if (rank == block_rank) {
 				block = STARPU_PLU(get_block)(bi, bj);
 				int ret = MPI_Send(block, block_size*block_size, MPI_TYPE, 0, 0, MPI_COMM_WORLD);
 				STARPU_ASSERT(ret == MPI_SUCCESS);