From 4e7875551ab3ee52a94162278f6b58060ee0a2f4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 5 Jan 2015 09:18:32 -0600 Subject: [PATCH] Remove a member variable that is never set to anything other than 'true'. --- include/deal.II/base/mpi.h | 9 --------- source/base/mpi.cc | 5 +---- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index 9b1d4900d4..24a3ad6cfe 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -314,15 +314,6 @@ namespace Utilities * MPI process. */ ~MPI_InitFinalize(); - - private: - /** - * This flag tells the class whether it owns the MPI process (i.e., it - * has been constructed using the argc/argv input, or it has been - * copied). In the former case, the command MPI_Finalize() will - * be called at destruction. - */ - const bool owns_mpi; }; namespace internal diff --git a/source/base/mpi.cc b/source/base/mpi.cc index 7f25575378..2680c3272a 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -317,8 +317,6 @@ namespace Utilities MPI_InitFinalize::MPI_InitFinalize (int &argc, char ** &argv, const unsigned int max_num_threads) - : - owns_mpi (true) { static bool constructor_has_already_run = false; Assert (constructor_has_already_run == false, @@ -353,7 +351,6 @@ namespace Utilities // about these variables (void)argc; (void)argv; - (void)owns_mpi; #endif // we are allowed to call MPI_Init ourselves and PETScInitialize will @@ -508,7 +505,7 @@ namespace Utilities int MPI_has_been_started = 0; MPI_Initialized(&MPI_has_been_started); - if (Utilities::System::job_supports_mpi() == true && owns_mpi == true && + if (Utilities::System::job_supports_mpi() == true && MPI_has_been_started != 0) { if (std::uncaught_exception()) -- 2.39.5