]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify test failing for older gcc 6842/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 25 Jun 2018 16:21:29 +0000 (18:21 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 25 Jun 2018 22:21:03 +0000 (00:21 +0200)
tests/trilinos/sparse_matrix_add_03.cc
tests/trilinos/sparse_matrix_copy_from_02.cc

index e46b6ec3156f277c3f45b08c6a5573a2e0986eb6..ff5463c55f811a93f9d964ff8dea3d00bcf98012 100644 (file)
 void
 test()
 {
-  const auto MyPID{Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)};
-  const auto NumProc{Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD)};
+  const unsigned int MyPID   = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
+  const unsigned int NumProc = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
 
-  if (!MyPID)
+  if (MyPID == 0)
     deallog << "NumProc=" << NumProc << std::endl;
 
   // create non-contiguous index set for NumProc > 1
@@ -89,14 +89,14 @@ test()
     {
       const auto &el = M1.el(i, i);
 
-      if (!MyPID)
+      if (MyPID == 0)
         deallog << "i = " << i << " , j = " << i << " , el = " << el
                 << std::endl;
 
       AssertThrow(el == dealii::numbers::PI, dealii::ExcInternalError());
     }
 
-  if (!MyPID)
+  if (MyPID == 0)
     deallog << "OK" << std::endl;
 }
 
index 3dbbb5214a399f3bff45d32c2f6fce08b255bc44..f389224f025bf77cf34eff3350fe48c7fa89aba1 100644 (file)
 void
 test()
 {
-  const auto MyPID{Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)};
-  const auto NumProc{Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD)};
+  const unsigned int MyPID   = Utilities::MPI::this_mpi_process(MPI_COMM_WORLD);
+  const unsigned int NumProc = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD);
 
-  if (!MyPID)
+  if (MyPID == 0)
     deallog << "NumProc=" << NumProc << std::endl;
 
   // create non-contiguous index set for NumProc > 1
@@ -89,14 +89,14 @@ test()
     {
       const auto &el = M1.el(i, i);
 
-      if (!MyPID)
+      if (MyPID == 0)
         deallog << "i = " << i << " , j = " << i << " , el = " << el
                 << std::endl;
 
       AssertThrow(el == dealii::numbers::PI, dealii::ExcInternalError());
     }
 
-  if (!MyPID)
+  if (MyPID == 0)
     deallog << "OK" << std::endl;
 }
 

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.