浏览代码

mpi/tests: use MPI_STATUS_IGNORE instead of NULL

Nathalie Furmento 10 年之前
父节点
当前提交
f231361589
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 4 4
      mpi/tests/sync.c
  2. 1 1
      mpi/tests/tags_checking.c

+ 4 - 4
mpi/tests/sync.c

@@ -45,7 +45,7 @@ int main(int argc, char **argv)
 	}
 	else
 	{
-		MPI_Recv(&x, 1, MPI_INT, other_rank, 10, MPI_COMM_WORLD, NULL);
+		MPI_Recv(&x, 1, MPI_INT, other_rank, 10, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
 		FPRINTF(stderr, "[%d] received %d\n", rank, x);
 	}
 
@@ -69,20 +69,20 @@ int main(int argc, char **argv)
 		starpu_mpi_req req;
 		starpu_mpi_issend(data[1], &req, other_rank, 22, MPI_COMM_WORLD);
 		starpu_mpi_send(data[0], other_rank, 12, MPI_COMM_WORLD);
-		starpu_mpi_wait(&req, NULL);
+		starpu_mpi_wait(&req, MPI_STATUS_IGNORE);
 	}
 	else
 	{
 		int *xx;
 
-		starpu_mpi_recv(data[0], other_rank, 12, MPI_COMM_WORLD, NULL);
+		starpu_mpi_recv(data[0], other_rank, 12, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
 		xx = (int *)starpu_variable_get_local_ptr(data[0]);
 		FPRINTF_MPI(stderr, "received %d\n", *xx);
 		STARPU_ASSERT_MSG(x==*xx, "Received value %d is incorrect (should be %d)\n", *xx, x);
 
 		starpu_variable_data_register(&data[1], -1, (uintptr_t)NULL, sizeof(unsigned));
 		starpu_mpi_data_register(data[1], 22, 0);
-		starpu_mpi_recv(data[0],  other_rank, 22, MPI_COMM_WORLD, NULL);
+		starpu_mpi_recv(data[0],  other_rank, 22, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
 		xx = (int *)starpu_variable_get_local_ptr(data[0]);
 		STARPU_ASSERT_MSG(x==*xx, "Received value %d is incorrect (should be %d)\n", *xx, x);
 	}

+ 1 - 1
mpi/tests/tags_checking.c

@@ -81,7 +81,7 @@ int do_test(int rank, int sdetached, int rdetached)
 			if (rdetached)
 				starpu_mpi_irecv_detached(data[i], 1, starpu_data_get_tag(data[i]), MPI_COMM_WORLD, callback, &received);
 			else
-				starpu_mpi_recv(data[i], 1, starpu_data_get_tag(data[i]), MPI_COMM_WORLD, NULL);
+				starpu_mpi_recv(data[i], 1, starpu_data_get_tag(data[i]), MPI_COMM_WORLD, MPI_STATUS_IGNORE);
 		}
 
 		if (rdetached)