]> https://gitweb.dealii.org/ - dealii.git/commitdiff
make tests more interesting 930/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 13 May 2015 18:58:16 +0000 (14:58 -0400)
committerTimo Heister <timo.heister@gmail.com>
Wed, 13 May 2015 18:58:16 +0000 (14:58 -0400)
32 files changed:
tests/mpi/collective_max_array.cc
tests/mpi/collective_max_array.mpirun=1.output
tests/mpi/collective_max_array.mpirun=10.output
tests/mpi/collective_max_array.mpirun=4.output
tests/mpi/collective_max_array_in_place.cc
tests/mpi/collective_max_array_in_place.mpirun=1.output
tests/mpi/collective_max_array_in_place.mpirun=10.output
tests/mpi/collective_max_array_in_place.mpirun=4.output
tests/mpi/collective_max_vector.cc
tests/mpi/collective_max_vector.mpirun=1.output
tests/mpi/collective_max_vector.mpirun=10.output
tests/mpi/collective_max_vector.mpirun=4.output
tests/mpi/collective_max_vector_in_place.cc
tests/mpi/collective_max_vector_in_place.mpirun=1.output
tests/mpi/collective_max_vector_in_place.mpirun=10.output
tests/mpi/collective_max_vector_in_place.mpirun=4.output
tests/mpi/collective_min_array.cc
tests/mpi/collective_min_array.mpirun=1.output
tests/mpi/collective_min_array.mpirun=10.output
tests/mpi/collective_min_array.mpirun=4.output
tests/mpi/collective_min_array_in_place.cc
tests/mpi/collective_min_array_in_place.mpirun=1.output
tests/mpi/collective_min_array_in_place.mpirun=10.output
tests/mpi/collective_min_array_in_place.mpirun=4.output
tests/mpi/collective_min_vector.cc
tests/mpi/collective_min_vector.mpirun=1.output
tests/mpi/collective_min_vector.mpirun=10.output
tests/mpi/collective_min_vector.mpirun=4.output
tests/mpi/collective_min_vector_in_place.cc
tests/mpi/collective_min_vector_in_place.mpirun=1.output
tests/mpi/collective_min_vector_in_place.mpirun=10.output
tests/mpi/collective_min_vector_in_place.mpirun=4.output

index c75a806f89abe9ba7868a44dbea4774e68854764..a9f41e266b119850828d44c870547acb1cb45b7a 100644 (file)
@@ -27,13 +27,13 @@ void test()
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   const unsigned int numprocs = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
 
-  unsigned int values[2] = { 1, 2 };
+  unsigned int values[2] = { 1+myid, numprocs+myid };
   unsigned int maxima[2];
   Utilities::MPI::max (values,
                        MPI_COMM_WORLD,
                        maxima);
-  Assert (maxima[0] == 1, ExcInternalError());
-  Assert (maxima[1] == 2, ExcInternalError());
+  Assert (maxima[0] == numprocs, ExcInternalError());
+  Assert (maxima[1] == 2*numprocs-1, ExcInternalError());
 
   if (myid==0)
     deallog << maxima[0] << ' ' << maxima[1] << std::endl;
index 6e10373d77e66608e1084cffd0884420ae80b042..fe633e16a61956af87ee61cb2b30437838d9f36a 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 1
index 6e10373d77e66608e1084cffd0884420ae80b042..4a447c1695fbc727f9b46f8443420bc5f02b0b59 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::10 19
index 6e10373d77e66608e1084cffd0884420ae80b042..0aedfbfded4e84c72a4b575521e3aae9c0482cba 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::4 7
index f40e52bd2aeadde7cf8efc0f01645f4631eb158d..a04aefcf3d9db15db07413af795057f34fc68618 100644 (file)
@@ -27,12 +27,12 @@ void test()
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   const unsigned int numprocs = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
 
-  unsigned int maxima[2] = { 1, 2 };
+  unsigned int maxima[2] = { 1+myid, numprocs+myid };
   Utilities::MPI::max (maxima,
                        MPI_COMM_WORLD,
                        maxima);
-  Assert (maxima[0] == 1, ExcInternalError());
-  Assert (maxima[1] == 2, ExcInternalError());
+  Assert (maxima[0] == numprocs, ExcInternalError());
+  Assert (maxima[1] == 2*numprocs-1, ExcInternalError());
 
   if (myid==0)
     deallog << maxima[0] << ' ' << maxima[1] << std::endl;
index 6e10373d77e66608e1084cffd0884420ae80b042..fe633e16a61956af87ee61cb2b30437838d9f36a 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 1
index 6e10373d77e66608e1084cffd0884420ae80b042..4a447c1695fbc727f9b46f8443420bc5f02b0b59 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::10 19
index 6e10373d77e66608e1084cffd0884420ae80b042..0aedfbfded4e84c72a4b575521e3aae9c0482cba 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::4 7
index 2ac4caa07f22cf809a552587552296d2d8ee2298..9e6773aeda66454c2a851320523c82f3b02e59ee 100644 (file)
@@ -27,14 +27,14 @@ void test()
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   const unsigned int numprocs = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
 
-  unsigned int values_[2] = { 1, 2 };
+  unsigned int values_[2] = { 1+myid, numprocs+myid };
   std::vector<unsigned int> values(&values_[0], &values_[2]);
   std::vector<unsigned int> maxima(2);
   Utilities::MPI::max (values,
                        MPI_COMM_WORLD,
                        maxima);
-  Assert (maxima[0] == 1, ExcInternalError());
-  Assert (maxima[1] == 2, ExcInternalError());
+  Assert (maxima[0] == numprocs, ExcInternalError());
+  Assert (maxima[1] == 2*numprocs-1, ExcInternalError());
 
   if (myid==0)
     deallog << maxima[0] << ' ' << maxima[1] << std::endl;
index 6e10373d77e66608e1084cffd0884420ae80b042..fe633e16a61956af87ee61cb2b30437838d9f36a 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 1
index 6e10373d77e66608e1084cffd0884420ae80b042..4a447c1695fbc727f9b46f8443420bc5f02b0b59 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::10 19
index 6e10373d77e66608e1084cffd0884420ae80b042..0aedfbfded4e84c72a4b575521e3aae9c0482cba 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::4 7
index 6d2f96f3140b3c3b084b6f0a21149e6bb420b8f8..239200ac0c457067f4ec0a8345fd5e6850884e60 100644 (file)
@@ -27,13 +27,13 @@ void test()
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   const unsigned int numprocs = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
 
-  unsigned int values_[2] = { 1, 2 };
+  unsigned int values_[2] = { myid, numprocs+myid };
   std::vector<unsigned int> maxima(&values_[0], &values_[2]);
   Utilities::MPI::max (maxima,
                        MPI_COMM_WORLD,
                        maxima);
-  Assert (maxima[0] == 1, ExcInternalError());
-  Assert (maxima[1] == 2, ExcInternalError());
+  Assert (maxima[0] == numprocs-1, ExcInternalError());
+  Assert (maxima[1] == 2*numprocs-1, ExcInternalError());
 
   if (myid==0)
     deallog << maxima[0] << ' ' << maxima[1] << std::endl;
index 6e10373d77e66608e1084cffd0884420ae80b042..0d5d12cfbbf41a66addb31c4019c68b4de015e67 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::0 1
index 6e10373d77e66608e1084cffd0884420ae80b042..a1a6b132cbd477bc1590e9342b97c155e16eb7a4 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::9 19
index 6e10373d77e66608e1084cffd0884420ae80b042..7794f4476b6e4c152be2e6416a69c753567ab6dd 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::3 7
index 0c51e6b70d98ecd43de3400c55f7f3c52e6bec92..0c2255853b901d94b6a8710fd09e351478b518eb 100644 (file)
@@ -27,13 +27,13 @@ void test()
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   const unsigned int numprocs = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
 
-  unsigned int values[2] = { 1, 2 };
+  unsigned int values[2] = { 1+myid, numprocs+myid };
   unsigned int minima[2];
   Utilities::MPI::min (values,
                        MPI_COMM_WORLD,
                        minima);
   Assert (minima[0] == 1, ExcInternalError());
-  Assert (minima[1] == 2, ExcInternalError());
+  Assert (minima[1] == numprocs, ExcInternalError());
 
   if (myid==0)
     deallog << minima[0] << ' ' << minima[1] << std::endl;
index 6e10373d77e66608e1084cffd0884420ae80b042..fe633e16a61956af87ee61cb2b30437838d9f36a 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 1
index 6e10373d77e66608e1084cffd0884420ae80b042..4a54bd444ce24ff3de434592d929741412eb8969 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 10
index 6e10373d77e66608e1084cffd0884420ae80b042..d768b1a787768234adf47d07a52255c3b3be95e5 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 4
index ce893afb15e51c02d31ead10b4961094c0873f2e..e52cd4c9f9aa7ca87e116b7516d88b852e2e44dd 100644 (file)
@@ -27,12 +27,12 @@ void test()
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   const unsigned int numprocs = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
 
-  unsigned int minima[2] = { 1, 2 };
+  unsigned int minima[2] = { 1+myid, numprocs+myid };
   Utilities::MPI::min (minima,
                        MPI_COMM_WORLD,
                        minima);
   Assert (minima[0] == 1, ExcInternalError());
-  Assert (minima[1] == 2, ExcInternalError());
+  Assert (minima[1] == numprocs, ExcInternalError());
 
   if (myid==0)
     deallog << minima[0] << ' ' << minima[1] << std::endl;
index 6e10373d77e66608e1084cffd0884420ae80b042..fe633e16a61956af87ee61cb2b30437838d9f36a 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 1
index 6e10373d77e66608e1084cffd0884420ae80b042..4a54bd444ce24ff3de434592d929741412eb8969 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 10
index 6e10373d77e66608e1084cffd0884420ae80b042..d768b1a787768234adf47d07a52255c3b3be95e5 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 4
index f32bc2f7002a156b0442aa6bb1e00d3f6c75e283..9cc73d99bacb250e259b127e70e2c2a9586a8813 100644 (file)
@@ -27,14 +27,14 @@ void test()
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   const unsigned int numprocs = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
 
-  unsigned int values_[2] = { 1, 2 };
+  unsigned int values_[2] = { 1+myid, numprocs+myid };
   std::vector<unsigned int> values(&values_[0], &values_[2]);
   std::vector<unsigned int> output(2);
   Utilities::MPI::min (values,
                        MPI_COMM_WORLD,
                        output);
   Assert (output[0] == 1, ExcInternalError());
-  Assert (output[1] == 2, ExcInternalError());
+  Assert (output[1] == numprocs, ExcInternalError());
 
   if (myid==0)
     deallog << output[0] << ' ' << output[1] << std::endl;
index 6e10373d77e66608e1084cffd0884420ae80b042..fe633e16a61956af87ee61cb2b30437838d9f36a 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 1
index 6e10373d77e66608e1084cffd0884420ae80b042..4a54bd444ce24ff3de434592d929741412eb8969 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 10
index 6e10373d77e66608e1084cffd0884420ae80b042..d768b1a787768234adf47d07a52255c3b3be95e5 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::1 4
index c87c80b9d4b59da2d8f29558f8a07bef5b9df0aa..5dce2fd1cec241fc6df6416f1d88d984b51a7189 100644 (file)
@@ -27,13 +27,13 @@ void test()
   unsigned int myid = Utilities::MPI::this_mpi_process (MPI_COMM_WORLD);
   const unsigned int numprocs = Utilities::MPI::n_mpi_processes (MPI_COMM_WORLD);
 
-  unsigned int values_[2] = { 1, 2 };
+  unsigned int values_[2] = { myid, numprocs+myid };
   std::vector<unsigned int> inout(&values_[0], &values_[2]);
   Utilities::MPI::min (inout,
                        MPI_COMM_WORLD,
                        inout);
-  Assert (inout[0] == 1, ExcInternalError());
-  Assert (inout[1] == 2, ExcInternalError());
+  Assert (inout[0] == 0, ExcInternalError());
+  Assert (inout[1] == numprocs, ExcInternalError());
 
   if (myid==0)
     deallog << inout[0] << ' ' << inout[1] << std::endl;
index 6e10373d77e66608e1084cffd0884420ae80b042..0d5d12cfbbf41a66addb31c4019c68b4de015e67 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::0 1
index 6e10373d77e66608e1084cffd0884420ae80b042..7e451b43ad88883b7e6082add27f03c65e24c2f7 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::0 10
index 6e10373d77e66608e1084cffd0884420ae80b042..e4d80026b4f096991b50ec591fab9ccea4e4508b 100644 (file)
@@ -1,2 +1,2 @@
 
-DEAL:mpi::1 2
+DEAL:mpi::0 4

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.