]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix MPI::Utilities::some_to_some 9162/head
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 10 Dec 2019 23:41:38 +0000 (18:41 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 10 Dec 2019 23:42:29 +0000 (18:42 -0500)
include/deal.II/base/mpi.h
tests/dofs/dof_tools_22a.cc
tests/dofs/dof_tools_22a.with_p4est=true.with_trilinos=true.mpirun=1.output
tests/dofs/dof_tools_22a.with_p4est=true.with_trilinos=true.mpirun=3.output
tests/dofs/dof_tools_22a.with_p4est=true.with_trilinos=true.mpirun=5.output

index 0f267f22a88ddbde248c6416a885067108ea9a78..1156ab9142944e8b504da415d2f3770487fa3282 100644 (file)
@@ -1506,6 +1506,10 @@ namespace Utilities
       const unsigned int n_point_point_communications =
         Utilities::MPI::compute_n_point_to_point_communications(comm, send_to);
 
+      // Protect the following communication:
+      static CollectiveMutex      mutex;
+      CollectiveMutex::ScopedLock lock(mutex, comm);
+
       // If we have something to send, or we expect something from other
       // processors, we need to visit one of the two scopes below. Otherwise,
       // no other action is required by this mpi process, and we can safely
@@ -1513,10 +1517,6 @@ namespace Utilities
       if (send_to.size() == 0 && n_point_point_communications == 0)
         return received_objects;
 
-      // Protect the following communication:
-      static CollectiveMutex      mutex;
-      CollectiveMutex::ScopedLock lock(mutex, comm);
-
       const int mpi_tag =
         internal::Tags::compute_point_to_point_communication_pattern;
 
index 0ca80adbd0eff0cc01eef09e0c1268981fd2a136..d092899b826a538fbdb0074c82715dcebb28696f 100644 (file)
@@ -124,7 +124,7 @@ test()
   deallog.push(Utilities::int_to_string(myid));
 
   deallog << "**** proc " << myid << ": \n\n";
-  deallog << "Sparsity pattern:\n";
+  deallog << "Sparsity pattern:" << std::endl;
   sp.print_gnuplot(deallog.get_file_stream());
 
   MPI_Barrier(MPI_COMM_WORLD);
index 98a40dba86d9303c319d308fab033fdd9663d8b2..2081760d4e664762783adcb176f415beb24a43b1 100644 (file)
@@ -1,4 +1,7 @@
 
+DEAL:0:0:0::**** proc 0: 
+
+Sparsity pattern:
 0 0
 1 0
 2 0
index 5a38705aa88aa8de1fc52ad43d17b329070fc921..f5c319ef8f6120fac493ed2351431be190b80c8e 100644 (file)
@@ -1,4 +1,7 @@
 
+DEAL:0:0:0::**** proc 0: 
+
+Sparsity pattern:
 0 0
 1 0
 2 0
 118 -119
 119 -119
 
+DEAL:1:1:1::**** proc 1: 
+
+Sparsity pattern:
 2 -2
 3 -2
 7 -2
 133 -133
 
 
+DEAL:2:2:2::**** proc 2: 
+
+Sparsity pattern:
 3 -3
 50 -3
 53 -3
index d9687a5e5e3241a9dd25e73ca7ce2dee968dd5ae..d2718cdc5f9f87e228418bfbee21b3f1cd74bae3 100644 (file)
@@ -1,4 +1,7 @@
 
+DEAL:0:0:0::**** proc 0: 
+
+Sparsity pattern:
 0 0
 1 0
 2 0
 90 -91
 91 -91
 
+DEAL:1:1:1::**** proc 1: 
+
+Sparsity pattern:
 1 -1
 3 -1
 5 -1
 119 -119
 
 
+DEAL:2:2:2::**** proc 2: 
+
+Sparsity pattern:
 2 -2
 3 -2
 7 -2
 133 -133
 
 
+DEAL:3:3:3::**** proc 3: 
+
+Sparsity pattern:
 3 -3
 50 -3
 53 -3
 146 -146
 
 
+DEAL:4:4:4::**** proc 4: 
+
+Sparsity pattern:
 

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.