From 1b851a45e0ba5303ef767b383a7db9be3536b5aa Mon Sep 17 00:00:00 2001 From: Pieter Ghysels Date: Tue, 24 Oct 2023 14:44:44 -0700 Subject: [PATCH] Fix for BLR K-way partitioning --- src/sparse/fronts/FrontalMatrixBLR.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sparse/fronts/FrontalMatrixBLR.cpp b/src/sparse/fronts/FrontalMatrixBLR.cpp index 343360d6..1f97b162 100644 --- a/src/sparse/fronts/FrontalMatrixBLR.cpp +++ b/src/sparse/fronts/FrontalMatrixBLR.cpp @@ -582,8 +582,14 @@ namespace strumpack { sep_tiles_ = sep_tree.template leaf_sizes(); #else int K = std::round((1.* dim_sep()) / opts.BLR_options().leaf_size()); - sep_tiles_ = g.partition_K_way - (std::max(K, 1), sorder+sep_begin_, nullptr, 0, 0, dim_sep()); + if (K > 1) + sep_tiles_ = g.partition_K_way + (K, sorder+sep_begin_, nullptr, 0, 0, dim_sep()); + else { + sep_tiles_ = {std::size_t(dim_sep())}; + for (integer_t i=sep_begin_; i siorder(dim_sep()); for (integer_t i=sep_begin_; i