From: Daniel Arndt Date: Mon, 25 Jun 2018 16:21:29 +0000 (+0200) Subject: Simplify test failing for older gcc X-Git-Tag: v9.1.0-rc1~983^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6842%2Fhead;p=dealii.git Simplify test failing for older gcc --- diff --git a/tests/trilinos/sparse_matrix_add_03.cc b/tests/trilinos/sparse_matrix_add_03.cc index e46b6ec315..ff5463c55f 100644 --- a/tests/trilinos/sparse_matrix_add_03.cc +++ b/tests/trilinos/sparse_matrix_add_03.cc @@ -34,10 +34,10 @@ 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; } diff --git a/tests/trilinos/sparse_matrix_copy_from_02.cc b/tests/trilinos/sparse_matrix_copy_from_02.cc index 3dbbb5214a..f389224f02 100644 --- a/tests/trilinos/sparse_matrix_copy_from_02.cc +++ b/tests/trilinos/sparse_matrix_copy_from_02.cc @@ -34,10 +34,10 @@ 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; }