]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix some stupid bug when using an uninitialize variable that apparently only
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 18 Apr 2005 22:58:49 +0000 (22:58 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 18 Apr 2005 22:58:49 +0000 (22:58 +0000)
happens on newer MPI systems.

git-svn-id: https://svn.dealii.org/trunk@10523 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.html
deal.II/examples/step-17/step-17.cc

index 57b3ab98d1d792ed3c6fcf754928773e230bacf2..d30dba3a4d00cab83b8915b5cbea67c340fb4e71 100644 (file)
@@ -42,7 +42,6 @@ inconvenience this causes.
 
 
 <ol>
-
   <li> <p>Changed: The template argument of <code
   class="class">BlockMatrixArray</code> was changed to
   <tt>number</tt>, equal to the same argument of the used <code
@@ -101,6 +100,16 @@ inconvenience this causes.
 <h3>General</h3>
 
 <ol>
+  <li> <p>
+       Fixed: The step-17 example program had a stupid mistake in that it
+       initializes the <code>pcout</code> variable with an uninitialized value
+       of <code>mpi_communicator</code>. While this seems to have worked for
+       some older MPI implementations, this is no longer the case on some
+       other systems. It is now fixed.
+       <br>
+       (WB, 2005/04/18)
+       </p>
+
   <li> <p>
        New: If there are references to other example programs in any of the
        step-XX programs, then they will now show up as crosslinks in the HTML
index e7bd29bb5fd8790cf2b1422c067983e55ac7da73..5e38916fabced5b4e61138d9e28f0aeff0e506fa 100644 (file)
@@ -391,12 +391,14 @@ ElasticProblem<dim>::get_this_mpi_process (const MPI_Comm &mpi_communicator)
                                  // processes), and call above helper
                                  // functions to determine the number of
                                  // processes and where the present one fits
-                                 // into this picture:
+                                 // into this picture. In addition, we make
+                                 // sure that output is only generated by the
+                                 // (globally) first process:
 template <int dim>
 ElasticProblem<dim>::ElasticProblem ()
                 :
                 pcout (std::cout,
-                       get_this_mpi_process(mpi_communicator) == 0),
+                       get_this_mpi_process(MPI_COMM_WORLD) == 0),
                dof_handler (triangulation),
                fe (FE_Q<dim>(1), dim),
                 mpi_communicator (MPI_COMM_WORLD),

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.