From 69b0f9a5ce1e6e3304faad646045398610871a3a Mon Sep 17 00:00:00 2001 From: Benjamin Brands Date: Mon, 12 Feb 2018 08:46:23 +0100 Subject: [PATCH] Fix bug in ScaLAPACKMatrix::save --- source/lac/scalapack.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/lac/scalapack.cc b/source/lac/scalapack.cc index 9d2328794e..1fbe23f489 100644 --- a/source/lac/scalapack.cc +++ b/source/lac/scalapack.cc @@ -972,9 +972,6 @@ void ScaLAPACKMatrix::save(const char *filename, AssertThrow(false, ExcMessage ("HDF5 support is disabled.")); #else - Assert((chunk_size.first <= (unsigned int)n_rows) && (chunk_size.first>0),ExcIndexRange(chunk_size.first,1,n_rows+1)); - Assert((chunk_size.second <= (unsigned int)n_columns) && (chunk_size.second>0),ExcIndexRange(chunk_size.second,1,n_columns+1)); - std::pair chunks_size_ = chunk_size; if (chunks_size_.first==numbers::invalid_unsigned_int || chunks_size_.second==numbers::invalid_unsigned_int) @@ -983,6 +980,8 @@ void ScaLAPACKMatrix::save(const char *filename, chunks_size_.first = n_rows; chunks_size_.second = 1; } + Assert((chunks_size_.first <= (unsigned int)n_rows) && (chunks_size_.first>0),ExcIndexRange(chunks_size_.first,1,n_rows+1)); + Assert((chunks_size_.second <= (unsigned int)n_columns) && (chunks_size_.second>0),ExcIndexRange(chunks_size_.second,1,n_columns+1)); # ifdef H5_HAVE_PARALLEL //implementation for configurations equipped with a parallel file system -- 2.39.5