]> https://gitweb.dealii.org/ - dealii.git/commitdiff
LA:d:V: fix size in the case of shared memory 13737/head
authorPeter Munch <peterrmuench@gmail.com>
Sun, 15 May 2022 10:13:30 +0000 (12:13 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 15 May 2022 10:13:30 +0000 (12:13 +0200)
include/deal.II/lac/la_parallel_vector.templates.h

index f1eca66944b3154b3472075b3a96dfa4b87392f2..97fd82bd540d1f5fe17ff674346f4a27c8e1c18b 100644 (file)
@@ -171,10 +171,9 @@ namespace LinearAlgebra
 
               const std::size_t align_by = 64;
 
-              std::size_t s =
-                ((new_alloc_size * sizeof(Number) + align_by - 1) /
-                 sizeof(Number)) *
-                sizeof(Number);
+              std::size_t s = ((new_alloc_size * sizeof(Number) + align_by) /
+                               sizeof(Number)) *
+                              sizeof(Number);
 
               ierr = MPI_Win_allocate_shared(
                 s, sizeof(Number), info, comm_shared, &data_this, &mpi_window);

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.