From 79883bf93a61cdb605fcff1f80b352047f356da7 Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 3 Jun 2022 11:28:16 -0400 Subject: [PATCH] Initialize MPI with step-77. SUNDIALS duplicates communicators even in serial. --- examples/step-77/step-77.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/step-77/step-77.cc b/examples/step-77/step-77.cc index 3f8a5bc379..38c5559a73 100644 --- a/examples/step-77/step-77.cc +++ b/examples/step-77/step-77.cc @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -640,11 +641,19 @@ namespace Step77 } // namespace Step77 -int main() +int main(int argc, char **argv) { try { using namespace Step77; +#ifdef DEAL_II_WITH_MPI + dealii::Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, + argv, + 1); +#else + (void)argc; + (void)argv; +#endif MinimalSurfaceProblem<2> laplace_problem_2d; laplace_problem_2d.run(); -- 2.39.5