]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Better document a piece of code. 6008/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 8 Mar 2018 14:41:43 +0000 (07:41 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 8 Mar 2018 14:41:43 +0000 (07:41 -0700)
source/lac/petsc_parallel_vector.cc

index 08c2c8e89bccf482ec0dd119b604399d357544ad..859a952b9ab03c9cd5ad875ef90cf0d254d3eebb 100644 (file)
@@ -378,13 +378,18 @@ namespace PETScWrappers
       else
         out.setf (std::ios::fixed, std::ios::floatfield);
 
+      // let each processor produce its output in turn. this requires
+      // synchronizing output between processors using a barrier --
+      // which is clearly slow, but nobody is going to print a whole
+      // matrix this way on a regular basis for production runs, so
+      // the slowness of the barrier doesn't matter
       for ( unsigned int i = 0;
             i < Utilities::MPI::n_mpi_processes(communicator);
             i++)
         {
-          // This is slow, but most likely only used to debug.
           const int mpi_ierr = MPI_Barrier(communicator);
           AssertThrowMPI(mpi_ierr);
+
           if (i == Utilities::MPI::this_mpi_process(communicator))
             {
               if (across)

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.