From c14b9d538b3dda69c70dae84259c01dbbc4b5a47 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sun, 9 Dec 2018 20:10:39 +0100 Subject: [PATCH] Change structure of two Asserts --- source/lac/scalapack.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/lac/scalapack.cc b/source/lac/scalapack.cc index 273abfc8b0..4e1e038ffc 100644 --- a/source/lac/scalapack.cc +++ b/source/lac/scalapack.cc @@ -2617,8 +2617,12 @@ ScaLAPACKMatrix::save( chunks_size_.first = n_rows; chunks_size_.second = 1; } - AssertIndexRange(chunks_size_.first - 1, n_rows); - AssertIndexRange(chunks_size_.second - 1, n_columns); + Assert(chunks_size_.first > 0, + ExcMessage("The row chunk size must be larger than 0.")); + AssertIndexRange(chunks_size_.first, n_rows + 1); + Assert(chunks_size_.second > 0, + ExcMessage("The column chunk size must be larger than 0.")); + AssertIndexRange(chunks_size_.second, n_columns + 1); # ifdef H5_HAVE_PARALLEL // implementation for configurations equipped with a parallel file system -- 2.39.5