Browse Source

In spite of the MPI norm, some MPI implementation seems to require that the
status is not NULL when calling MPI_recv.

Cédric Augonnet 15 years ago
parent
commit
cf48d2f6c6
2 changed files with 4 additions and 2 deletions
  1. 2 1
      mpi/tests/pingpong.c
  2. 2 1
      mpi/tests/ring.c

+ 2 - 1
mpi/tests/pingpong.c

@@ -59,7 +59,8 @@ int main(int argc, char **argv)
 			starpu_mpi_send(tab_handle, other_rank, loop, MPI_COMM_WORLD);
 		}
 		else {
-			starpu_mpi_recv(tab_handle, other_rank, loop, MPI_COMM_WORLD, NULL);
+			MPI_Status status;
+			starpu_mpi_recv(tab_handle, other_rank, loop, MPI_COMM_WORLD, &status);
 		}
 	}
 	

+ 2 - 1
mpi/tests/ring.c

@@ -90,7 +90,8 @@ int main(int argc, char **argv)
 		if (!((loop == 0) && (rank == 0)))
 		{
 			token = 0;
-			starpu_mpi_recv(token_handle, (rank+size-1)%size, tag, MPI_COMM_WORLD, NULL);
+			MPI_Status status;
+			starpu_mpi_recv(token_handle, (rank+size-1)%size, tag, MPI_COMM_WORLD, &status);
 		}
 		else {
 			token = 0;