From e0d7cf439954717d56bb2b58dd6eea1d195d0a8a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 9 Jan 2015 01:26:37 -0600 Subject: [PATCH] For programs that use Trilinos, we need to initialize the MPI system even if the program does not in fact use MPI. --- examples/step-43/step-43.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/step-43/step-43.cc b/examples/step-43/step-43.cc index 2d89d11627..e5be5dfc58 100644 --- a/examples/step-43/step-43.cc +++ b/examples/step-43/step-43.cc @@ -2239,8 +2239,11 @@ start_time_iteration: // @sect3{The main() function} // -// The main function looks almost the same as in all other programs: -int main () +// The main function looks almost the same as in all other programs. The need +// to initialize the MPI subsystem for a program that uses Trilinos -- even +// for programs that do not actually run in parallel -- is explained in +// step-31. +int main (int argc, char *argv[]) { try { @@ -2249,6 +2252,8 @@ int main () deallog.depth_console (0); + Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv); + TwoPhaseFlowProblem<2> two_phase_flow_problem(1); two_phase_flow_problem.run (); } -- 2.39.5