]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix NoncontiguousPartitioner::import_from_ghosted_array() 16080/head
authorPeter Munch <peterrmuench@gmail.com>
Mon, 2 Oct 2023 18:51:18 +0000 (20:51 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Mon, 2 Oct 2023 18:51:18 +0000 (20:51 +0200)
include/deal.II/base/mpi_noncontiguous_partitioner.templates.h

index 48f934a80bcde5ce79d70d5e8052b6f4b830adad..56f256b3fc5e06a9e82c45e2c194a90b429b1333 100644 (file)
@@ -279,7 +279,7 @@ namespace Utilities
                       send_ranks[i],
                       tag,
                       communicator,
-                      &requests[i + send_ranks.size()]);
+                      &requests[i]);
           AssertThrowMPI(ierr);
         }
 
@@ -304,7 +304,7 @@ namespace Utilities
                       recv_ranks[i],
                       tag,
                       communicator,
-                      &requests[i]);
+                      &requests[i + send_ranks.size()]);
           AssertThrowMPI(ierr);
         }
 #endif
@@ -343,10 +343,8 @@ namespace Utilities
         {
           int        i;
           MPI_Status status;
-          const auto ierr = MPI_Waitany(recv_ranks.size(),
-                                        requests.data() + send_ranks.size(),
-                                        &i,
-                                        &status);
+          const auto ierr =
+            MPI_Waitany(send_ranks.size(), requests.data(), &i, &status);
           AssertThrowMPI(ierr);
         }
 
@@ -364,8 +362,9 @@ namespace Utilities
         }
 
       // wait that all data packages have been sent
-      const int ierr =
-        MPI_Waitall(send_ranks.size(), requests.data(), MPI_STATUSES_IGNORE);
+      const int ierr = MPI_Waitall(recv_ranks.size(),
+                                   requests.data() + send_ranks.size(),
+                                   MPI_STATUSES_IGNORE);
       AssertThrowMPI(ierr);
 #endif
     }

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.