]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compression (zero out ghosts in one go)
authorPeter Munch <peterrmuench@gmail.com>
Sun, 22 Mar 2020 22:49:38 +0000 (23:49 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sun, 22 Mar 2020 22:49:38 +0000 (23:49 +0100)
include/deal.II/lac/la_sm_partitioner.h
include/deal.II/lac/la_sm_vector.templates.h

index 2ad2dcea5744cc0daf13d7ed2ab9d14197e03aae..2b60c5e4fd541196ddc649f36e02267c74b30dfb 100644 (file)
@@ -246,7 +246,7 @@ namespace LinearAlgebra
                     0,
                     MPI_INT,
                     recv_sm_ranks[i],
-                    communication_channel + 1,
+                    communication_channel + 2,
                     comm_sm,
                     recv_sm_req.data() + i);
 
@@ -255,7 +255,7 @@ namespace LinearAlgebra
                     0,
                     MPI_INT,
                     send_sm_ranks[i],
-                    communication_channel + 1,
+                    communication_channel + 2,
                     comm_sm,
                     send_sm_req.data() + i);
 
@@ -264,7 +264,7 @@ namespace LinearAlgebra
                     recv_remote_ptr[i + 1] - recv_remote_ptr[i],
                     Utilities::MPI::internal::mpi_type_id(data_this),
                     recv_remote_ranks[i],
-                    communication_channel + 0,
+                    communication_channel + 3,
                     comm,
                     recv_remote_req.data() + i);
 
@@ -279,7 +279,7 @@ namespace LinearAlgebra
                       send_remote_ptr[i + 1] - send_remote_ptr[i],
                       Utilities::MPI::internal::mpi_type_id(data_this),
                       send_remote_ranks[i],
-                      communication_channel + 0,
+                      communication_channel + 3,
                       comm,
                       send_remote_req.data() + i);
           }
@@ -383,7 +383,7 @@ namespace LinearAlgebra
                         &i,
                         MPI_STATUS_IGNORE);
 
-            const Number *__restrict__ data_others_ptr =
+            Number *__restrict__ data_others_ptr =
               data_others[send_sm_ranks[i]];
             Number *__restrict__ data_this_ptr = data_this;
 
@@ -392,6 +392,7 @@ namespace LinearAlgebra
                  j++, k++)
               {
                 data_this_ptr[send_sm_indices[j]] += data_others_ptr[k];
+                data_others_ptr[k] = 0.0;
               }
           }
 
index 18a938eda1f28c742c9ba392adfb5a84936464ac..873c6a6488ea0ca011cf8f01bc47e9a51191b509 100644 (file)
@@ -1030,7 +1030,7 @@ namespace LinearAlgebra
     typename Vector<Number, MemorySpaceType>::real_type
     Vector<Number, MemorySpaceType>::linfty_norm_local() const
     {
-      real_type max = 0.;
+      real_type max = Number();
 
       auto values = this->begin();
 

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.