From 25b28cae7f2be477a1f9a726fdda01304fecfa2c Mon Sep 17 00:00:00 2001
From: Martin Kronbichler <kronbichler@lnm.mw.tum.de>
Date: Thu, 2 May 2013 13:48:22 +0000
Subject: [PATCH] Enable multithreading by default.

git-svn-id: https://svn.dealii.org/trunk@29426 0785d39b-7218-0410-832d-ea1e28bc413d
---
 deal.II/examples/step-48/step-48.cc | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/deal.II/examples/step-48/step-48.cc b/deal.II/examples/step-48/step-48.cc
index e5e71e7d20..79250490ed 100644
--- a/deal.II/examples/step-48/step-48.cc
+++ b/deal.II/examples/step-48/step-48.cc
@@ -3,7 +3,7 @@
 
 /*    $Id$       */
 /*                                                                */
-/*    Copyright (C) 2011-2012 by the deal.II authors             */
+/*    Copyright (C) 2011-2013 by the deal.II authors             */
 /*                                                                */
 /*    This file is subject to QPL and may not be  distributed     */
 /*    without copyright and license information. Please refer     */
@@ -603,13 +603,20 @@ namespace Step48
 
 // @sect3{The <code>main</code> function}
 
-// This is as in all other programs:
+// As in step-40, we initialize MPI at the start of the program. Since we will
+// in general mix MPI parallelization with threads, we also set the third
+// argument in MPI_InitFinalize that controls the number of threads to an
+// invalid number, which means that the TBB library chooses the number of
+// threads automatically, typically to the number of available cores in the
+// system. As an alternative, you can also set this number manually if you
+// want to set a specific number of threads (e.g. when MPI-only is required).
 int main (int argc, char **argv)
 {
   using namespace Step48;
   using namespace dealii;
 
-  Utilities::System::MPI_InitFinalize mpi_initialization(argc, argv);
+  Utilities::System::MPI_InitFinalize mpi_initialization(argc, argv,
+                                                         numbers::invalid_unsigned_int);
 
   try
     {
-- 
2.39.5