]> https://gitweb.dealii.org/ - dealii.git/commitdiff
remove inconsistency/bug in cases of serial save/ parallel load and vice versa
authorBenjamin Brands <benjamin.brands@fau.de>
Thu, 9 Aug 2018 10:59:31 +0000 (12:59 +0200)
committerBenjamin Brands <benjamin.brands@fau.de>
Thu, 9 Aug 2018 11:00:06 +0000 (13:00 +0200)
source/lac/scalapack.cc

index 6a41d47a2226022c9a5645a02f8004a48253808c..6c0292042fe6fa23a21919885052913c5846a938 100644 (file)
@@ -2739,7 +2739,7 @@ ScaLAPACKMatrix<NumberType>::save_parallel(
                                                   1,
                                                   n_mpi_processes);
 
-  const int MB = n_rows, NB = std::ceil(n_columns / n_mpi_processes);
+  const int MB = n_rows, NB = std::ceil((double)n_columns / n_mpi_processes);
   ScaLAPACKMatrix<NumberType> tmp(n_rows, n_columns, column_grid, MB, NB);
   copy_to(tmp);
 
@@ -3155,7 +3155,7 @@ ScaLAPACKMatrix<NumberType>::load_parallel(const char *filename)
                                                   1,
                                                   n_mpi_processes);
 
-  const int MB = n_rows, NB = std::ceil(n_columns / n_mpi_processes);
+  const int MB = n_rows, NB = std::ceil((double)n_columns / n_mpi_processes);
   ScaLAPACKMatrix<NumberType> tmp(n_rows, n_columns, column_grid, MB, NB);
 
   // get pointer to data held by the process

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.