From: Timo Heister Date: Wed, 3 Aug 2011 16:06:09 +0000 (+0000) Subject: fix test for bug in trilinos compress() X-Git-Tag: v8.0.0~3763 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=834dbd4e68fa8c55592c63043c6c80df3584d433;p=dealii.git fix test for bug in trilinos compress() git-svn-id: https://svn.dealii.org/trunk@24005 0785d39b-7218-0410-832d-ea1e28bc413d --- 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;