Explorar o código

test needs at least 2 MPI nodes

Samuel Thibault %!s(int64=7) %!d(string=hai) anos
pai
achega
38db1dc4d6
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      mpi/tests/temporary.c

+ 10 - 0
mpi/tests/temporary.c

@@ -64,6 +64,16 @@ int main(int argc, char **argv)
 	starpu_mpi_comm_rank(MPI_COMM_WORLD, &rank);
 	starpu_mpi_comm_size(MPI_COMM_WORLD, &size);
 
+	if (size < 2)
+	{
+		if (rank == 0)
+			FPRINTF(stderr, "We need at least 2 processes.\n");
+
+		starpu_mpi_shutdown();
+		starpu_shutdown();
+		return STARPU_TEST_SKIPPED;
+	}
+
 	if (starpu_mpi_cache_is_enabled() == 0) goto skip;
 
 	if (rank == 0)