]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Tests: Fix mpi_fe_field_function_01.mpirun=10
authorMatthias Maier <tamiko@43-1.org>
Thu, 7 Jul 2016 10:00:50 +0000 (05:00 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 7 Jul 2016 10:00:50 +0000 (05:00 -0500)
A point might be found on simultaneously on more than one process (e.g.,
also in the ghost layer of a neighboring process).

tests/mpi/fe_field_function_01.cc

index 6b6692032ae10cb4e0274fc64bdf8bfc2afea200..8305bbd4e71224fef084068fb8052587939ff471 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2009 - 2015 by the deal.II authors
+// Copyright (C) 2009 - 2016 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -106,8 +106,10 @@ void test()
           point_found = false;
         }
 
-      Assert (Utilities::MPI::sum(point_found ? 1 : 0, MPI_COMM_WORLD) == 1,
-              ExcInternalError());
+      // the point should be found at least once (it  might also be found
+      // in the ghost layer)
+      Assert(Utilities::MPI::sum(point_found ? 1 : 0, MPI_COMM_WORLD) >= 1,
+             ExcInternalError());
     }
 
   if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)

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.