Bladeren bron

mpi/tests/ring_async_implicit.c: mpi is initialised by starpu

Nathalie Furmento 14 jaren geleden
bovenliggende
commit
0682670ec2
2 gewijzigde bestanden met toevoegingen van 26 en 5 verwijderingen
  1. 20 1
      mpi/Makefile.am
  2. 6 4
      mpi/tests/ring_async_implicit.c

+ 20 - 1
mpi/Makefile.am

@@ -16,7 +16,8 @@
 
 CC=$(MPICC)
 
-TESTS = $(check_PROGRAMS)
+TESTS_ENVIRONMENT	=	$(shell dirname $(MPICC))/mpiexec -np 2
+TESTS			=	$(check_PROGRAMS)
 
 check_PROGRAMS =
 
@@ -81,6 +82,10 @@ libstarpumpi_la_SOURCES =				\
 
 if !NO_BLAS_LIB
 
+#check_PROGRAMS += 				\
+#	examples/mpi_lu/plu_example_float	\
+#	examples/mpi_lu/plu_example_double
+
 examplebin_PROGRAMS += 				\
 	examples/mpi_lu/plu_example_float	\
 	examples/mpi_lu/plu_example_double
@@ -106,6 +111,20 @@ examples_mpi_lu_plu_example_double_SOURCES =	\
 	$(top_srcdir)/examples/common/blas.c
 endif
 
+check_PROGRAMS +=				\
+	tests/pingpong					\
+	tests/mpi_test					\
+	tests/mpi_isend					\
+	tests/mpi_irecv					\
+	tests/mpi_isend_detached			\
+	tests/mpi_irecv_detached			\
+	tests/mpi_detached_tag				\
+	tests/ring					\
+	tests/ring_async				\
+	tests/ring_async_implicit			\
+	tests/block_interface				\
+	tests/block_interface_pinned
+
 mpiexamplebin_PROGRAMS =				\
 	tests/pingpong					\
 	tests/mpi_test					\

+ 6 - 4
mpi/tests/ring_async_implicit.c

@@ -53,12 +53,16 @@ void increment_token(void)
 
 int main(int argc, char **argv)
 {
-	MPI_Init(NULL, NULL);
-
 	int rank, size;
 
+#if 0
+	MPI_Init(NULL, NULL);
 	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
 	MPI_Comm_size(MPI_COMM_WORLD, &size);
+#endif
+
+	starpu_init(NULL);
+	starpu_mpi_initialize_extended(1, &rank, &size);
 
 	if (size < 2)
 	{
@@ -69,8 +73,6 @@ int main(int argc, char **argv)
 		return 0;
 	}
 
-	starpu_init(NULL);
-	starpu_mpi_initialize();
 
 	starpu_vector_data_register(&token_handle, 0, (uintptr_t)&token, 1, sizeof(unsigned));