From f384066b4de0bd5455494f47da07a81dcc77ba2a Mon Sep 17 00:00:00 2001 From: kronbichler Date: Thu, 21 Aug 2008 21:39:19 +0000 Subject: [PATCH] In case deal.II supports MPI, the program did not run. Inserted an MPI_Init and MPI_Finalize to fix that. git-svn-id: https://svn.dealii.org/trunk@16647 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-31/step-31.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/deal.II/examples/step-31/step-31.cc b/deal.II/examples/step-31/step-31.cc index 2e8fbf7d86..0eb173b456 100644 --- a/deal.II/examples/step-31/step-31.cc +++ b/deal.II/examples/step-31/step-31.cc @@ -59,6 +59,10 @@ #include #include +#ifdef DEAL_II_COMPILER_SUPPORT_MPI +#include +#endif + // This is Trilinos // Next, we import all deal.II @@ -2150,8 +2154,12 @@ void BoussinesqFlowProblem::run () // @sect3{The main 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; } -- 2.39.5