From: Martin Kronbichler Date: Fri, 15 Apr 2016 13:48:56 +0000 (+0200) Subject: Avoid setting the partitioner at the place of use X-Git-Tag: v8.5.0-rc1~1102^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c05cda6be4799c2b50df261751edd14d4f09cb2d;p=dealii.git Avoid setting the partitioner at the place of use --- diff --git a/include/deal.II/lac/vector.templates.h b/include/deal.II/lac/vector.templates.h index a27d46b131..124587345e 100644 --- a/include/deal.II/lac/vector.templates.h +++ b/include/deal.II/lac/vector.templates.h @@ -129,8 +129,9 @@ namespace internal if (vec_size >= 4*internal::Vector::minimum_parallel_grain_size && MultithreadInfo::n_threads() > 1) { - if (partitioner.get() == NULL) - partitioner.reset(new parallel::internal::TBBPartitioner()); + Assert(partitioner.get() != NULL, + ExcInternalError("Unexpected initialization of Vector that does " + "not set the TBB partitioner to a usable state.")); std_cxx11::shared_ptr tbb_partitioner = partitioner->acquire_one_partitioner(); @@ -878,7 +879,7 @@ void Vector::reinit (const size_type n, // only reset the partitioner if we actually expect a significant vector // size - if (vec_size > 4*internal::Vector::minimum_parallel_grain_size) + if (vec_size >= 4*internal::Vector::minimum_parallel_grain_size) thread_loop_partitioner.reset(new parallel::internal::TBBPartitioner()); }