From d8ae4b07d66d0975e01650826b10a43bfef08082 Mon Sep 17 00:00:00 2001 From: heister Date: Wed, 3 Aug 2011 16:06:09 +0000 Subject: [PATCH] fix test for bug in trilinos compress() git-svn-id: https://svn.dealii.org/trunk@24005 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/mpi/trilinos_compress_bug.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/mpi/trilinos_compress_bug.cc b/tests/mpi/trilinos_compress_bug.cc index da708c5712..9490d6f7aa 100644 --- a/tests/mpi/trilinos_compress_bug.cc +++ b/tests/mpi/trilinos_compress_bug.cc @@ -38,7 +38,7 @@ void test () locally_owned.add_range(0,9); else locally_owned.add_range(9,21); - +// TrilinosWrappers::MPI::Vector test1(locally_owned); if (myid==0) { @@ -56,8 +56,10 @@ void test () } test1.compress(Add); - TrilinosWrappers::MPI::Vector test(locally_owned); - // TrilinosWrappers::MPI::Vector test(test1); + + //TrilinosWrappers::MPI::Vector test(test1.vector_partitioner()); // works + //TrilinosWrappers::MPI::Vector test(locally_owned); // works + TrilinosWrappers::MPI::Vector test(test1); // fails test = 0; @@ -68,12 +70,15 @@ void test () deallog << "before compress: " << test(locally_owned.nth_index_in_set(5)) << endl; test.compress(Insert); + if (myid==0) deallog << "after compress: " << test(locally_owned.nth_index_in_set(5)) << endl; - // Trilinos produces a 0 instead of a 7 here. Why? - Assert(test(locally_owned.nth_index_in_set(5)) == 7, ExcInternalError()); + if (myid==0) + { + Assert(test(locally_owned.nth_index_in_set(5)) == 7, ExcInternalError()); + } if (Utilities::System::get_this_mpi_process (MPI_COMM_WORLD) == 0) deallog << "OK" << std::endl; -- 2.39.5