]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
In case deal.II supports MPI, the program did not run. Inserted an MPI_Init and MPI_F...
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 21 Aug 2008 21:39:19 +0000 (21:39 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 21 Aug 2008 21:39:19 +0000 (21:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@16647 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-31/step-31.cc

index 2e8fbf7d86535cfbcbbd44e1cf2d9da695a40836..0eb173b456b36c44dd88d2f86f9bf2a569a5ab71 100644 (file)
 #include <fstream>
 #include <sstream>
 
+#ifdef DEAL_II_COMPILER_SUPPORT_MPI
+#include <mpi.h>
+#endif
+
                                  // This is Trilinos
 
                                 // Next, we import all deal.II
@@ -2150,8 +2154,12 @@ void BoussinesqFlowProblem<dim>::run ()
 
 
                                 // @sect3{The <code>main</code> function}
-int main ()
+int main (int argc, char *argv[])
 {
+#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
+  MPI_Init (&argc,&argv);
+#endif
+  
   try
     {
       deallog.depth_console (0);
@@ -2183,6 +2191,10 @@ int main ()
                 << std::endl;
       return 1;
     }
+    
+#ifdef DEAL_II_COMPILER_SUPPORTS_MPI
+  MPI_Finalize();
+#endif
 
   return 0;
 }

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.