]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix tests/readwritevector_0x 5058/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 11 Sep 2017 20:08:03 +0000 (16:08 -0400)
committerTimo Heister <timo.heister@gmail.com>
Mon, 11 Sep 2017 20:08:43 +0000 (16:08 -0400)
include/deal.II/lac/read_write_vector.templates.h
tests/trilinos/readwritevector_02.mpirun=2.output
tests/trilinos/readwritevector_03.mpirun=2.output

index e21a8ea3b1b45e16ab7ea1b21f98fb5601dfa47c..6d61802ef109e964c41b6cbea4dbd6417c7ef19d 100644 (file)
@@ -404,6 +404,11 @@ namespace LinearAlgebra
                                   VectorOperation::values                         operation,
                                   std::shared_ptr<const CommunicationPatternBase> communication_pattern)
   {
+    // While the import does work with Trilinos 12.8.x, it fails with 12.4.x. To be safe,
+    // we disable it here. Note that it would be a useful case, as ReadWriteVector is
+    // supposed to replace ghosted vectors anyways.
+    AssertThrow(!trilinos_vec.has_ghost_elements(),
+                ExcMessage("Import() from TrilinosWrappers::MPI::Vector with ghost entries is not supported!"));
     import(trilinos_vec.trilinos_vector(), trilinos_vec.locally_owned_elements(),
            operation, trilinos_vec.get_mpi_communicator(), communication_pattern);
   }
index c4a4c340a52308bdc045a906b22303d8bde3eac6..e5cdeb3aeabddb3ff21ff11364cb62a8dec10bf8 100644 (file)
@@ -18,17 +18,17 @@ size:8 local_size:6 :
 DEAL:0::ghosted IS: {[0,5]}
 DEAL:0::tril_vector_ghosted.owned_elements() {[0,3]}
 DEAL:0::import of ghosted vector should fail:
-DEAL:0::ExcMessage("Epetra Import() failed with error code: " + Utilities::to_string(err))
+DEAL:0::ExcMessage("Import() from TrilinosWrappers::MPI::Vector with ghost entries is not supported!")
 DEAL:0::import of distributed vector should work:
 DEAL:0::RWVector contents:
 IndexSet: {[0,5]}
 
-0.000e+00
-1.000e+00
-2.000e+00
-3.000e+00
-4.000e+00
-5.000e+00
+[0]: 0.000e+00
+[1]: 1.000e+00
+[2]: 2.000e+00
+[3]: 3.000e+00
+[4]: 4.000e+00
+[5]: 5.000e+00
 DEAL:0::OK
 
 DEAL:1::IS: {[4,7]}
@@ -50,16 +50,16 @@ size:8 local_size:6 :
 DEAL:1::ghosted IS: {[2,7]}
 DEAL:1::tril_vector_ghosted.owned_elements() {[4,7]}
 DEAL:1::import of ghosted vector should fail:
-DEAL:1::ExcMessage("Epetra Import() failed with error code: " + Utilities::to_string(err))
+DEAL:1::ExcMessage("Import() from TrilinosWrappers::MPI::Vector with ghost entries is not supported!")
 DEAL:1::import of distributed vector should work:
 DEAL:1::RWVector contents:
 IndexSet: {[2,7]}
 
-2.000e+00
-3.000e+00
-4.000e+00
-5.000e+00
-6.000e+00
-7.000e+00
+[2]: 2.000e+00
+[3]: 3.000e+00
+[4]: 4.000e+00
+[5]: 5.000e+00
+[6]: 6.000e+00
+[7]: 7.000e+00
 DEAL:1::OK
 
index 0fc5b0b8797b81840b977103944062d883831b95..b35304314df7364b06955dc9509a3a18aef3dadc 100644 (file)
@@ -20,19 +20,19 @@ DEAL:0::tril_vector_ghosted.owned_elements() {[0,3]}
 DEAL:0::RWVector contents from tril_vector:
 IndexSet: {[0,3]}
 
-0.000e+00
-1.000e+00
-2.000e+00
-3.000e+00
+[0]: 0.000e+00
+[1]: 1.000e+00
+[2]: 2.000e+00
+[3]: 3.000e+00
 DEAL:0::RWVector contents from tril_vector_ghosted:
 IndexSet: {[0,5]}
 
-0.000e+00
-1.000e+00
-2.000e+00
-3.000e+00
-4.000e+00
-5.000e+00
+[0]: 0.000e+00
+[1]: 1.000e+00
+[2]: 2.000e+00
+[3]: 3.000e+00
+[4]: 4.000e+00
+[5]: 5.000e+00
 DEAL:0::OK
 
 DEAL:1::is: {[4,7]}
@@ -56,18 +56,18 @@ DEAL:1::tril_vector_ghosted.owned_elements() {[4,7]}
 DEAL:1::RWVector contents from tril_vector:
 IndexSet: {[4,7]}
 
-4.000e+00
-5.000e+00
-6.000e+00
-7.000e+00
+[4]: 4.000e+00
+[5]: 5.000e+00
+[6]: 6.000e+00
+[7]: 7.000e+00
 DEAL:1::RWVector contents from tril_vector_ghosted:
 IndexSet: {[2,7]}
 
-2.000e+00
-3.000e+00
-4.000e+00
-5.000e+00
-6.000e+00
-7.000e+00
+[2]: 2.000e+00
+[3]: 3.000e+00
+[4]: 4.000e+00
+[5]: 5.000e+00
+[6]: 6.000e+00
+[7]: 7.000e+00
 DEAL:1::OK
 

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.