From 3712f609cc96ad431798f04b2a23a67acc38dbae Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 20 Jan 2020 11:38:48 -0500 Subject: [PATCH] Check the value of the communication channel. The block vector class assumes it can use 100-199, where 200 is the limit set by the Partitioner class. --- include/deal.II/lac/la_parallel_vector.templates.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index 101350981a..f5c3560666 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -900,8 +900,7 @@ namespace LinearAlgebra const unsigned int communication_channel, ::dealii::VectorOperation::values operation) { - (void)communication_channel; - (void)operation; + AssertIndexRange(communication_channel, 100); Assert(vector_is_ghosted == false, ExcMessage("Cannot call compress() on a ghosted vector")); @@ -993,6 +992,9 @@ namespace LinearAlgebra import_data.values.get(), partitioner->n_import_indices()), compress_requests); } +#else + (void)communication_channel; + (void)operation; #endif } @@ -1078,6 +1080,7 @@ namespace LinearAlgebra Vector::update_ghost_values_start( const unsigned int communication_channel) const { + AssertIndexRange(communication_channel, 100); #ifdef DEAL_II_WITH_MPI // nothing to do when we neither have import nor ghost indices. if (partitioner->n_ghost_indices() == 0 && -- 2.39.5