]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix test for bug in trilinos compress()
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Aug 2011 16:06:09 +0000 (16:06 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Aug 2011 16:06:09 +0000 (16:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@24005 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/trilinos_compress_bug.cc

index da708c5712ce8c25717dcd7851a7fc9d528f1fcb..9490d6f7aab501f1062b566709bcb6b16bcd14c0 100644 (file)
@@ -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;

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.