From: Martin Kronbichler Date: Mon, 23 May 2022 18:32:07 +0000 (+0200) Subject: Fix two tests with vectorization disabled X-Git-Tag: v9.4.0-rc1~164^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13796%2Fhead;p=dealii.git Fix two tests with vectorization disabled --- diff --git a/include/deal.II/lac/diagonal_matrix.h b/include/deal.II/lac/diagonal_matrix.h index 00c9d998b2..0fd53c312f 100644 --- a/include/deal.II/lac/diagonal_matrix.h +++ b/include/deal.II/lac/diagonal_matrix.h @@ -446,7 +446,8 @@ DiagonalMatrix::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); diff --git a/tests/matrix_free/constraint_info_01.cc b/tests/matrix_free/constraint_info_01.cc index 65ccfb506c..2cc5a69ec4 100644 --- a/tests/matrix_free/constraint_info_01.cc +++ b/tests/matrix_free/constraint_info_01.cc @@ -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; diff --git a/tests/matrix_free/constraint_info_01.output b/tests/matrix_free/constraint_info_01.output index 3658842fd7..9cbf7e2bee 100644 --- a/tests/matrix_free/constraint_info_01.output +++ b/tests/matrix_free/constraint_info_01.output @@ -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 diff --git a/tests/matrix_free/solver_cg_interleave.cc b/tests/matrix_free/solver_cg_interleave.cc index bef4c74a30..88f92e2a5d 100644 --- a/tests/matrix_free/solver_cg_interleave.cc +++ b/tests/matrix_free/solver_cg_interleave.cc @@ -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;