]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix two tests with vectorization disabled 13796/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Mon, 23 May 2022 18:32:07 +0000 (20:32 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Mon, 23 May 2022 18:35:04 +0000 (20:35 +0200)
include/deal.II/lac/diagonal_matrix.h
tests/matrix_free/constraint_info_01.cc
tests/matrix_free/constraint_info_01.output
tests/matrix_free/solver_cg_interleave.cc

index 00c9d998b2a29647e1c480f6e7ad97fce44b3761..0fd53c312fb85a777efc174c4254a446d2c93a98 100644 (file)
@@ -446,7 +446,8 @@ DiagonalMatrix<VectorType>::apply_to_subrange(
   const value_type * src_pointer_to_current_range,
   value_type *       dst_pointer_to_current_range) const
 {
-  AssertIndexRange(begin_range, diagonal.locally_owned_elements().n_elements());
+  AssertIndexRange(begin_range,
+                   diagonal.locally_owned_elements().n_elements() + 1);
   AssertIndexRange(end_range,
                    diagonal.locally_owned_elements().n_elements() + 1);
 
index 65ccfb506c72c4f05efe786973cf20d23a56f8e5..2cc5a69ec43c2e63f3d8f769ef70bee1c307ea5b 100644 (file)
@@ -99,8 +99,13 @@ main()
       deallog << "(" << i.first << "," << i.second << ") ";
     deallog << std::endl;
 
-    for (const auto i : dof_info.row_starts)
-      deallog << "(" << i.first << "," << i.second << ") ";
+    // make sure to filter out contributions that only get filled up to make
+    // all SIMD lanes populated
+    for (unsigned int i = 0; i < dof_info.row_starts.size(); ++i)
+      if (i == 0 ||
+          (dof_info.row_starts[i].first > dof_info.row_starts[i - 1].first))
+        deallog << "(" << dof_info.row_starts[i].first << ","
+                << dof_info.row_starts[i].second << ") ";
     deallog << std::endl;
 
     deallog << std::endl;
index 3658842fd7246d91602d4e571de2f9879839fb8b..9cbf7e2bee723478203e25d0ad4f20075b03cb39 100644 (file)
@@ -5,7 +5,7 @@ DEAL::(0,0) (1,3) (3,5) (5,7) (7,9) (8,12) (9,15) (10,18)
 DEAL::
 DEAL::11 11 2 11 2 11 2 2 2 2 
 DEAL::(0,0) (0,0) (0,0) (0,0) (0,0) (0,0) (1,0) (1,0) (0,0) (0,0) (0,0) (1,0) (0,0) (1,0) (0,0) (1,0) (0,0) (0,0) 
-DEAL::(0,0) (1,3) (3,5) (5,7) (7,9) (8,12) (9,15) (10,18) (10,18) 
+DEAL::(0,0) (1,3) (3,5) (5,7) (7,9) (8,12) (9,15) (10,18) 
 DEAL::
 Process #0
 Local range: [0, 14), global size: 14
index bef4c74a30b31b6d09dd868db2820fdb0f26030e..88f92e2a5dd1fc2af421f301c8da8d02713eeaf8 100644 (file)
@@ -160,7 +160,8 @@ struct DiagonalMatrixSubrange
                     const Number *     src_pointer_to_current_range,
                     Number *           dst_pointer_to_current_range) const
   {
-    AssertIndexRange(begin_range, vec.locally_owned_elements().n_elements());
+    AssertIndexRange(begin_range,
+                     vec.locally_owned_elements().n_elements() + 1);
     AssertIndexRange(end_range, vec.locally_owned_elements().n_elements() + 1);
 
     const Number *     diagonal_entry = vec.begin() + begin_range;

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.