From c41c0f78048fc7711d3158f8f6268f58b4ffd82d Mon Sep 17 00:00:00 2001 From: heister Date: Wed, 27 Mar 2013 15:07:57 +0000 Subject: [PATCH] convert more tests to MPI_InitFinalize git-svn-id: https://svn.dealii.org/trunk@29075 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/distributed_grids/2d_coarse_grid_01.cc | 11 ++--------- tests/distributed_grids/2d_coarse_grid_02.cc | 11 ++--------- tests/distributed_grids/2d_coarse_grid_03.cc | 11 ++--------- tests/distributed_grids/2d_coarse_grid_04.cc | 11 ++--------- tests/distributed_grids/2d_coarse_grid_x_01.cc | 11 ++--------- tests/distributed_grids/2d_coarsening_01.cc | 11 ++--------- tests/distributed_grids/2d_coarsening_02.cc | 11 ++--------- tests/distributed_grids/2d_coarsening_03.cc | 11 ++--------- tests/distributed_grids/2d_coarsening_05.cc | 11 ++--------- tests/distributed_grids/2d_dofhandler_01.cc | 11 ++--------- tests/distributed_grids/2d_refinement_01.cc | 11 ++--------- tests/distributed_grids/2d_refinement_02.cc | 11 ++--------- tests/distributed_grids/2d_refinement_03.cc | 11 ++--------- tests/distributed_grids/2d_refinement_04.cc | 11 ++--------- tests/distributed_grids/2d_refinement_05.cc | 11 ++--------- tests/distributed_grids/2d_refinement_06.cc | 11 ++--------- tests/distributed_grids/3d_coarse_grid_01.cc | 11 ++--------- tests/distributed_grids/3d_coarse_grid_02.cc | 11 ++--------- tests/distributed_grids/3d_coarse_grid_03.cc | 11 ++--------- tests/distributed_grids/3d_coarse_grid_04.cc | 11 ++--------- tests/distributed_grids/3d_coarse_grid_05.cc | 11 ++--------- tests/distributed_grids/3d_coarse_grid_06.cc | 11 ++--------- tests/distributed_grids/3d_coarse_grid_x_01.cc | 11 ++--------- tests/distributed_grids/3d_coarsening_01.cc | 11 ++--------- tests/distributed_grids/3d_coarsening_02.cc | 11 ++--------- tests/distributed_grids/3d_coarsening_03.cc | 11 ++--------- tests/distributed_grids/3d_coarsening_04.cc | 11 ++--------- tests/distributed_grids/3d_coarsening_05.cc | 11 ++--------- tests/distributed_grids/3d_refinement_01.cc | 11 +---------- tests/distributed_grids/3d_refinement_02.cc | 11 ++--------- tests/distributed_grids/3d_refinement_03.cc | 6 ++---- tests/distributed_grids/3d_refinement_04.cc | 6 ++---- tests/distributed_grids/3d_refinement_05.cc | 6 ++---- tests/distributed_grids/3d_refinement_06.cc | 6 ++---- tests/distributed_grids/3d_refinement_07.cc | 6 ++---- tests/distributed_grids/3d_refinement_08.cc | 6 ++---- tests/distributed_grids/anisotropic.cc | 6 ++---- tests/distributed_grids/count_dofs_per_block_01.cc | 6 ++---- .../distributed_grids/count_dofs_per_component_01.cc | 6 ++---- tests/distributed_grids/dof_handler_number_cache.cc | 6 ++---- tests/distributed_grids/solution_transfer_01.cc | 6 ++---- tests/distributed_grids/solution_transfer_02.cc | 6 ++---- tests/distributed_grids/solution_transfer_03.cc | 7 ++----- tests/distributed_grids/solution_transfer_04.cc | 10 +--------- tests/distributed_grids/tria_settings_01.cc | 11 +---------- tests/distributed_grids/update_number_cache_01.cc | 10 +--------- 46 files changed, 88 insertions(+), 352 deletions(-) diff --git a/tests/distributed_grids/2d_coarse_grid_01.cc b/tests/distributed_grids/2d_coarse_grid_01.cc index 28a33a4a9e..e0642b3d98 100644 --- a/tests/distributed_grids/2d_coarse_grid_01.cc +++ b/tests/distributed_grids/2d_coarse_grid_01.cc @@ -64,12 +64,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_coarse_grid_01/output"); deallog.attach(logfile); @@ -80,7 +75,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_coarse_grid_02.cc b/tests/distributed_grids/2d_coarse_grid_02.cc index 68c0965643..0708e4b676 100644 --- a/tests/distributed_grids/2d_coarse_grid_02.cc +++ b/tests/distributed_grids/2d_coarse_grid_02.cc @@ -54,12 +54,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_coarse_grid_02/output"); deallog.attach(logfile); @@ -70,7 +65,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_coarse_grid_03.cc b/tests/distributed_grids/2d_coarse_grid_03.cc index 90e060b87d..c47b8e8238 100644 --- a/tests/distributed_grids/2d_coarse_grid_03.cc +++ b/tests/distributed_grids/2d_coarse_grid_03.cc @@ -42,12 +42,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_coarse_grid_03/output"); deallog.attach(logfile); @@ -58,7 +53,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_coarse_grid_04.cc b/tests/distributed_grids/2d_coarse_grid_04.cc index 5ca30d4f1d..158ccca174 100644 --- a/tests/distributed_grids/2d_coarse_grid_04.cc +++ b/tests/distributed_grids/2d_coarse_grid_04.cc @@ -40,12 +40,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_coarse_grid_04/output"); deallog.attach(logfile); @@ -56,7 +51,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_coarse_grid_x_01.cc b/tests/distributed_grids/2d_coarse_grid_x_01.cc index 26c9b2e3e8..18e53184ea 100644 --- a/tests/distributed_grids/2d_coarse_grid_x_01.cc +++ b/tests/distributed_grids/2d_coarse_grid_x_01.cc @@ -77,12 +77,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_coarse_grid_x_01/output"); deallog.attach(logfile); @@ -93,7 +88,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_coarsening_01.cc b/tests/distributed_grids/2d_coarsening_01.cc index 6b2f815dba..2da0da62aa 100644 --- a/tests/distributed_grids/2d_coarsening_01.cc +++ b/tests/distributed_grids/2d_coarsening_01.cc @@ -46,12 +46,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_coarsening_01/output"); deallog.attach(logfile); @@ -62,7 +57,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_coarsening_02.cc b/tests/distributed_grids/2d_coarsening_02.cc index 87c19a85e5..871da074e0 100644 --- a/tests/distributed_grids/2d_coarsening_02.cc +++ b/tests/distributed_grids/2d_coarsening_02.cc @@ -116,12 +116,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_coarsening_02/output"); deallog.attach(logfile); @@ -132,7 +127,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_coarsening_03.cc b/tests/distributed_grids/2d_coarsening_03.cc index 1b67534b27..c9a6c47abd 100644 --- a/tests/distributed_grids/2d_coarsening_03.cc +++ b/tests/distributed_grids/2d_coarsening_03.cc @@ -177,12 +177,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_coarsening_03/output"); deallog.attach(logfile); @@ -193,7 +188,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_coarsening_05.cc b/tests/distributed_grids/2d_coarsening_05.cc index 21f91f1cc6..6e2317c45e 100644 --- a/tests/distributed_grids/2d_coarsening_05.cc +++ b/tests/distributed_grids/2d_coarsening_05.cc @@ -104,12 +104,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_coarsening_05/output"); deallog.attach(logfile); @@ -120,7 +115,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_dofhandler_01.cc b/tests/distributed_grids/2d_dofhandler_01.cc index 82095b7a24..b06a97e421 100644 --- a/tests/distributed_grids/2d_dofhandler_01.cc +++ b/tests/distributed_grids/2d_dofhandler_01.cc @@ -72,12 +72,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_dofhandler_01/output"); deallog.attach(logfile); @@ -88,7 +83,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_refinement_01.cc b/tests/distributed_grids/2d_refinement_01.cc index dcc990b07f..f32c2e912b 100644 --- a/tests/distributed_grids/2d_refinement_01.cc +++ b/tests/distributed_grids/2d_refinement_01.cc @@ -44,12 +44,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_refinement_01/output"); deallog.attach(logfile); @@ -60,7 +55,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_refinement_02.cc b/tests/distributed_grids/2d_refinement_02.cc index 8ce225e28c..89d3df70ea 100644 --- a/tests/distributed_grids/2d_refinement_02.cc +++ b/tests/distributed_grids/2d_refinement_02.cc @@ -105,12 +105,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_refinement_02/output"); deallog.attach(logfile); @@ -121,7 +116,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_refinement_03.cc b/tests/distributed_grids/2d_refinement_03.cc index bafba9678c..fba62dccab 100644 --- a/tests/distributed_grids/2d_refinement_03.cc +++ b/tests/distributed_grids/2d_refinement_03.cc @@ -135,12 +135,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_refinement_03/output"); deallog.attach(logfile); @@ -151,7 +146,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_refinement_04.cc b/tests/distributed_grids/2d_refinement_04.cc index 4bc8c2c716..17a02ff8ce 100644 --- a/tests/distributed_grids/2d_refinement_04.cc +++ b/tests/distributed_grids/2d_refinement_04.cc @@ -73,12 +73,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_refinement_04/output"); deallog.attach(logfile); @@ -89,7 +84,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_refinement_05.cc b/tests/distributed_grids/2d_refinement_05.cc index 760de2b998..39a2b3de74 100644 --- a/tests/distributed_grids/2d_refinement_05.cc +++ b/tests/distributed_grids/2d_refinement_05.cc @@ -92,12 +92,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_refinement_05/output"); deallog.attach(logfile); @@ -108,7 +103,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/2d_refinement_06.cc b/tests/distributed_grids/2d_refinement_06.cc index 05aeb1b154..d0018fc851 100644 --- a/tests/distributed_grids/2d_refinement_06.cc +++ b/tests/distributed_grids/2d_refinement_06.cc @@ -68,12 +68,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("2d_refinement_06/output"); deallog.attach(logfile); @@ -84,7 +79,5 @@ int main(int argc, char *argv[]) test<2>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarse_grid_01.cc b/tests/distributed_grids/3d_coarse_grid_01.cc index c840c2550d..b7d54528d9 100644 --- a/tests/distributed_grids/3d_coarse_grid_01.cc +++ b/tests/distributed_grids/3d_coarse_grid_01.cc @@ -64,12 +64,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarse_grid_01/output"); deallog.attach(logfile); @@ -80,7 +75,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarse_grid_02.cc b/tests/distributed_grids/3d_coarse_grid_02.cc index 052ad36e6e..a392c3842e 100644 --- a/tests/distributed_grids/3d_coarse_grid_02.cc +++ b/tests/distributed_grids/3d_coarse_grid_02.cc @@ -48,12 +48,7 @@ void test(const char *filename) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarse_grid_02/output"); deallog.attach(logfile); @@ -75,7 +70,5 @@ int main(int argc, char *argv[]) deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarse_grid_03.cc b/tests/distributed_grids/3d_coarse_grid_03.cc index 39c4d91ed4..3a55242cf5 100644 --- a/tests/distributed_grids/3d_coarse_grid_03.cc +++ b/tests/distributed_grids/3d_coarse_grid_03.cc @@ -42,12 +42,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarse_grid_03/output"); deallog.attach(logfile); @@ -58,7 +53,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarse_grid_04.cc b/tests/distributed_grids/3d_coarse_grid_04.cc index cccb5ec5ca..1804e626a4 100644 --- a/tests/distributed_grids/3d_coarse_grid_04.cc +++ b/tests/distributed_grids/3d_coarse_grid_04.cc @@ -40,12 +40,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarse_grid_04/output"); deallog.attach(logfile); @@ -56,7 +51,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarse_grid_05.cc b/tests/distributed_grids/3d_coarse_grid_05.cc index 9b6ec2c326..3c48065419 100644 --- a/tests/distributed_grids/3d_coarse_grid_05.cc +++ b/tests/distributed_grids/3d_coarse_grid_05.cc @@ -141,12 +141,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarse_grid_05/output"); deallog.attach(logfile); @@ -161,7 +156,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarse_grid_06.cc b/tests/distributed_grids/3d_coarse_grid_06.cc index 4d6b8d3814..305d725dad 100644 --- a/tests/distributed_grids/3d_coarse_grid_06.cc +++ b/tests/distributed_grids/3d_coarse_grid_06.cc @@ -43,12 +43,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarse_grid_06/output"); deallog.attach(logfile); @@ -59,7 +54,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarse_grid_x_01.cc b/tests/distributed_grids/3d_coarse_grid_x_01.cc index c8aec97534..935a0325c4 100644 --- a/tests/distributed_grids/3d_coarse_grid_x_01.cc +++ b/tests/distributed_grids/3d_coarse_grid_x_01.cc @@ -77,12 +77,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarse_grid_x_01/output"); deallog.attach(logfile); @@ -93,7 +88,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarsening_01.cc b/tests/distributed_grids/3d_coarsening_01.cc index 4b745fb7b7..7e3ed1b40f 100644 --- a/tests/distributed_grids/3d_coarsening_01.cc +++ b/tests/distributed_grids/3d_coarsening_01.cc @@ -46,12 +46,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarsening_01/output"); deallog.attach(logfile); @@ -62,7 +57,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarsening_02.cc b/tests/distributed_grids/3d_coarsening_02.cc index 9507281d4b..4be59da767 100644 --- a/tests/distributed_grids/3d_coarsening_02.cc +++ b/tests/distributed_grids/3d_coarsening_02.cc @@ -118,12 +118,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarsening_02/output"); deallog.attach(logfile); @@ -134,7 +129,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarsening_03.cc b/tests/distributed_grids/3d_coarsening_03.cc index 95aaf4bea5..7fbbdfc04a 100644 --- a/tests/distributed_grids/3d_coarsening_03.cc +++ b/tests/distributed_grids/3d_coarsening_03.cc @@ -115,12 +115,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarsening_03/output"); deallog.attach(logfile); @@ -131,7 +126,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarsening_04.cc b/tests/distributed_grids/3d_coarsening_04.cc index 8cf76c26c3..7b15347e23 100644 --- a/tests/distributed_grids/3d_coarsening_04.cc +++ b/tests/distributed_grids/3d_coarsening_04.cc @@ -116,12 +116,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarsening_04/output"); deallog.attach(logfile); @@ -132,7 +127,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_coarsening_05.cc b/tests/distributed_grids/3d_coarsening_05.cc index 20af470fc6..4c18e6231e 100644 --- a/tests/distributed_grids/3d_coarsening_05.cc +++ b/tests/distributed_grids/3d_coarsening_05.cc @@ -105,12 +105,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_coarsening_05/output"); deallog.attach(logfile); @@ -121,7 +116,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_refinement_01.cc b/tests/distributed_grids/3d_refinement_01.cc index 44edaa374a..37f2dcf9bb 100644 --- a/tests/distributed_grids/3d_refinement_01.cc +++ b/tests/distributed_grids/3d_refinement_01.cc @@ -44,12 +44,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_refinement_01/output"); deallog.attach(logfile); @@ -59,8 +54,4 @@ int main(int argc, char *argv[]) deallog.push("3d"); test<3>(logfile); deallog.pop(); - -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif } diff --git a/tests/distributed_grids/3d_refinement_02.cc b/tests/distributed_grids/3d_refinement_02.cc index 64f4fcef25..2fc606e0f6 100644 --- a/tests/distributed_grids/3d_refinement_02.cc +++ b/tests/distributed_grids/3d_refinement_02.cc @@ -105,12 +105,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("3d_refinement_02/output"); deallog.attach(logfile); @@ -121,7 +116,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_refinement_03.cc b/tests/distributed_grids/3d_refinement_03.cc index 4053960096..7af0a5a095 100644 --- a/tests/distributed_grids/3d_refinement_03.cc +++ b/tests/distributed_grids/3d_refinement_03.cc @@ -95,7 +95,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -110,7 +110,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_refinement_04.cc b/tests/distributed_grids/3d_refinement_04.cc index 5ecc081b8d..938b952b3a 100644 --- a/tests/distributed_grids/3d_refinement_04.cc +++ b/tests/distributed_grids/3d_refinement_04.cc @@ -74,7 +74,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -89,7 +89,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_refinement_05.cc b/tests/distributed_grids/3d_refinement_05.cc index b446ffa03e..a21770b45e 100644 --- a/tests/distributed_grids/3d_refinement_05.cc +++ b/tests/distributed_grids/3d_refinement_05.cc @@ -94,7 +94,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -109,7 +109,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_refinement_06.cc b/tests/distributed_grids/3d_refinement_06.cc index 72f1c363c2..2fbe9430bf 100644 --- a/tests/distributed_grids/3d_refinement_06.cc +++ b/tests/distributed_grids/3d_refinement_06.cc @@ -83,7 +83,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -98,7 +98,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_refinement_07.cc b/tests/distributed_grids/3d_refinement_07.cc index a9d0a1ca49..2b4e88b18f 100644 --- a/tests/distributed_grids/3d_refinement_07.cc +++ b/tests/distributed_grids/3d_refinement_07.cc @@ -57,7 +57,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -72,7 +72,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/3d_refinement_08.cc b/tests/distributed_grids/3d_refinement_08.cc index f6270bd29a..c392860f4c 100644 --- a/tests/distributed_grids/3d_refinement_08.cc +++ b/tests/distributed_grids/3d_refinement_08.cc @@ -96,7 +96,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -109,7 +109,5 @@ int main(int argc, char *argv[]) test<3>(logfile); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/anisotropic.cc b/tests/distributed_grids/anisotropic.cc index 8b62336990..c5079160da 100644 --- a/tests/distributed_grids/anisotropic.cc +++ b/tests/distributed_grids/anisotropic.cc @@ -51,7 +51,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -73,7 +73,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/count_dofs_per_block_01.cc b/tests/distributed_grids/count_dofs_per_block_01.cc index 03956767ee..56398865ed 100644 --- a/tests/distributed_grids/count_dofs_per_block_01.cc +++ b/tests/distributed_grids/count_dofs_per_block_01.cc @@ -106,7 +106,7 @@ void test() int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -134,7 +134,5 @@ int main(int argc, char *argv[]) test<3>(); } -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/count_dofs_per_component_01.cc b/tests/distributed_grids/count_dofs_per_component_01.cc index 2b83d4a300..3e849e604c 100644 --- a/tests/distributed_grids/count_dofs_per_component_01.cc +++ b/tests/distributed_grids/count_dofs_per_component_01.cc @@ -72,7 +72,7 @@ void test() int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -100,7 +100,5 @@ int main(int argc, char *argv[]) test<3>(); } -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/dof_handler_number_cache.cc b/tests/distributed_grids/dof_handler_number_cache.cc index 03fa3570da..8b58364a6a 100644 --- a/tests/distributed_grids/dof_handler_number_cache.cc +++ b/tests/distributed_grids/dof_handler_number_cache.cc @@ -108,7 +108,7 @@ void test() int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -136,7 +136,5 @@ int main(int argc, char *argv[]) test<3>(); } -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/solution_transfer_01.cc b/tests/distributed_grids/solution_transfer_01.cc index f607345060..55de735d4b 100644 --- a/tests/distributed_grids/solution_transfer_01.cc +++ b/tests/distributed_grids/solution_transfer_01.cc @@ -76,7 +76,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -94,7 +94,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/solution_transfer_02.cc b/tests/distributed_grids/solution_transfer_02.cc index 651b6a5cf6..99306cb8eb 100644 --- a/tests/distributed_grids/solution_transfer_02.cc +++ b/tests/distributed_grids/solution_transfer_02.cc @@ -112,7 +112,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -130,7 +130,5 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/solution_transfer_03.cc b/tests/distributed_grids/solution_transfer_03.cc index 158429e37c..6bfd0674ab 100644 --- a/tests/distributed_grids/solution_transfer_03.cc +++ b/tests/distributed_grids/solution_transfer_03.cc @@ -140,7 +140,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { #ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); #else (void)argc; (void)argv; @@ -157,8 +157,5 @@ int main(int argc, char *argv[]) deallog.push("3d"); test<3>(logfile); deallog.pop(); - -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif + } diff --git a/tests/distributed_grids/solution_transfer_04.cc b/tests/distributed_grids/solution_transfer_04.cc index b614384894..13afa73cce 100644 --- a/tests/distributed_grids/solution_transfer_04.cc +++ b/tests/distributed_grids/solution_transfer_04.cc @@ -97,12 +97,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("solution_transfer_04/output"); deallog.attach(logfile); @@ -116,7 +111,4 @@ int main(int argc, char *argv[]) test<3>(logfile); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif } diff --git a/tests/distributed_grids/tria_settings_01.cc b/tests/distributed_grids/tria_settings_01.cc index ccdf543a0f..bee3c55bc9 100644 --- a/tests/distributed_grids/tria_settings_01.cc +++ b/tests/distributed_grids/tria_settings_01.cc @@ -82,12 +82,7 @@ void test(std::ostream& /*out*/) int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("tria_settings_01/output"); deallog.attach(logfile); @@ -97,8 +92,4 @@ int main(int argc, char *argv[]) deallog.push("2d"); test<2>(logfile); deallog.pop(); - -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif } diff --git a/tests/distributed_grids/update_number_cache_01.cc b/tests/distributed_grids/update_number_cache_01.cc index d0b082a51b..2c136a1ff6 100644 --- a/tests/distributed_grids/update_number_cache_01.cc +++ b/tests/distributed_grids/update_number_cache_01.cc @@ -46,12 +46,7 @@ void test() int main(int argc, char *argv[]) { -#ifdef DEAL_II_WITH_MPI - MPI_Init (&argc,&argv); -#else - (void)argc; - (void)argv; -#endif + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); std::ofstream logfile("update_number_cache_01/output"); deallog.attach(logfile); @@ -62,7 +57,4 @@ int main(int argc, char *argv[]) test<2>(); deallog.pop(); -#ifdef DEAL_II_WITH_MPI - MPI_Finalize(); -#endif } -- 2.39.5