From: heister Date: Wed, 27 Mar 2013 03:33:29 +0000 (+0000) Subject: make PETSc tests use MPI_InitFinalize X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bfefaed24cd0c1b35cc7053a391d73c318f01b8;p=dealii-svn.git make PETSc tests use MPI_InitFinalize git-svn-id: https://svn.dealii.org/trunk@29053 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/petsc/01.cc b/tests/petsc/01.cc index e3ca8d8fba..8bcc7d3ed1 100644 --- a/tests/petsc/01.cc +++ b/tests/petsc/01.cc @@ -59,12 +59,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix m (5,5,3); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/02.cc b/tests/petsc/02.cc index 23a9b7d99c..67c711d98f 100644 --- a/tests/petsc/02.cc +++ b/tests/petsc/02.cc @@ -59,12 +59,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix m (5,5,3); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/04.cc b/tests/petsc/04.cc index aa24557a28..0826d676a1 100644 --- a/tests/petsc/04.cc +++ b/tests/petsc/04.cc @@ -39,12 +39,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix m (5,5,3); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/05.cc b/tests/petsc/05.cc index 70c898bdc9..6db0650dad 100644 --- a/tests/petsc/05.cc +++ b/tests/petsc/05.cc @@ -54,12 +54,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix m (5,5,3); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/06.cc b/tests/petsc/06.cc index 039baa3670..826e6a0c7d 100644 --- a/tests/petsc/06.cc +++ b/tests/petsc/06.cc @@ -50,12 +50,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix m (5,5,3); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/07.cc b/tests/petsc/07.cc index 0eeaa30bb2..2d7204b0ff 100644 --- a/tests/petsc/07.cc +++ b/tests/petsc/07.cc @@ -50,12 +50,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix m (5,5,3); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/08.cc b/tests/petsc/08.cc index bd20907674..946ae832c9 100644 --- a/tests/petsc/08.cc +++ b/tests/petsc/08.cc @@ -55,12 +55,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix m (5,5,3); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/09.cc b/tests/petsc/09.cc index bbf46e3d96..5fb39456a5 100644 --- a/tests/petsc/09.cc +++ b/tests/petsc/09.cc @@ -62,12 +62,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix m (5,5,3); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/10.cc b/tests/petsc/10.cc index 82404cf50e..279bf1c00c 100644 --- a/tests/petsc/10.cc +++ b/tests/petsc/10.cc @@ -62,12 +62,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix m (5,5,3); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/11.cc b/tests/petsc/11.cc index 85b84549f8..3883fe9766 100644 --- a/tests/petsc/11.cc +++ b/tests/petsc/11.cc @@ -44,12 +44,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/12.cc b/tests/petsc/12.cc index d9409f4418..dfb4007794 100644 --- a/tests/petsc/12.cc +++ b/tests/petsc/12.cc @@ -57,12 +57,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/13.cc b/tests/petsc/13.cc index 567062c650..fccaca59d0 100644 --- a/tests/petsc/13.cc +++ b/tests/petsc/13.cc @@ -57,12 +57,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/17.cc b/tests/petsc/17.cc index bd634aaf79..990a12af9c 100644 --- a/tests/petsc/17.cc +++ b/tests/petsc/17.cc @@ -49,12 +49,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/18.cc b/tests/petsc/18.cc index 42bdc8f55c..008258de6b 100644 --- a/tests/petsc/18.cc +++ b/tests/petsc/18.cc @@ -50,12 +50,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/19.cc b/tests/petsc/19.cc index 2dea1d9cee..f8c82b7964 100644 --- a/tests/petsc/19.cc +++ b/tests/petsc/19.cc @@ -49,12 +49,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/20.cc b/tests/petsc/20.cc index ae8de2390d..6b1604ecd3 100644 --- a/tests/petsc/20.cc +++ b/tests/petsc/20.cc @@ -58,12 +58,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/21.cc b/tests/petsc/21.cc index 5c67ebeffe..bd6a27d0db 100644 --- a/tests/petsc/21.cc +++ b/tests/petsc/21.cc @@ -58,12 +58,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/22.cc b/tests/petsc/22.cc index 5bff9b283d..4737abeeda 100644 --- a/tests/petsc/22.cc +++ b/tests/petsc/22.cc @@ -52,13 +52,13 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/23.cc b/tests/petsc/23.cc index 87bae12583..6c680fb3af 100644 --- a/tests/petsc/23.cc +++ b/tests/petsc/23.cc @@ -59,13 +59,13 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/24.cc b/tests/petsc/24.cc index c017c7c096..468f5cfc00 100644 --- a/tests/petsc/24.cc +++ b/tests/petsc/24.cc @@ -52,12 +52,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/25.cc b/tests/petsc/25.cc index 4137826365..c226bfea63 100644 --- a/tests/petsc/25.cc +++ b/tests/petsc/25.cc @@ -50,12 +50,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/26.cc b/tests/petsc/26.cc index b15d177562..7b70ce9358 100644 --- a/tests/petsc/26.cc +++ b/tests/petsc/26.cc @@ -49,12 +49,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/27.cc b/tests/petsc/27.cc index 18a1966f3c..2191e7510e 100644 --- a/tests/petsc/27.cc +++ b/tests/petsc/27.cc @@ -54,12 +54,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/28.cc b/tests/petsc/28.cc index 49b1754aa0..8abcb97b02 100644 --- a/tests/petsc/28.cc +++ b/tests/petsc/28.cc @@ -56,12 +56,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/29.cc b/tests/petsc/29.cc index 49f41722bc..cbcdf299b6 100644 --- a/tests/petsc/29.cc +++ b/tests/petsc/29.cc @@ -41,12 +41,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/30.cc b/tests/petsc/30.cc index 717d0170cd..b5bc3c12b3 100644 --- a/tests/petsc/30.cc +++ b/tests/petsc/30.cc @@ -49,12 +49,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/31.cc b/tests/petsc/31.cc index 5f01e1b24b..fd93b21ea9 100644 --- a/tests/petsc/31.cc +++ b/tests/petsc/31.cc @@ -51,12 +51,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/32.cc b/tests/petsc/32.cc index 3c2cf9feb6..a1c6782123 100644 --- a/tests/petsc/32.cc +++ b/tests/petsc/32.cc @@ -51,12 +51,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/33.cc b/tests/petsc/33.cc index 4399844d97..43872a1166 100644 --- a/tests/petsc/33.cc +++ b/tests/petsc/33.cc @@ -52,12 +52,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/34.cc b/tests/petsc/34.cc index 19a882f333..fa2467636c 100644 --- a/tests/petsc/34.cc +++ b/tests/petsc/34.cc @@ -52,12 +52,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/35.cc b/tests/petsc/35.cc index 8ee90dd268..1d06bc7be3 100644 --- a/tests/petsc/35.cc +++ b/tests/petsc/35.cc @@ -68,13 +68,13 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/36.cc b/tests/petsc/36.cc index 42be9144f0..8cd28ed8cd 100644 --- a/tests/petsc/36.cc +++ b/tests/petsc/36.cc @@ -68,13 +68,13 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/37.cc b/tests/petsc/37.cc index 5d704a49da..d87a5be431 100644 --- a/tests/petsc/37.cc +++ b/tests/petsc/37.cc @@ -48,12 +48,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/38.cc b/tests/petsc/38.cc index 21b697ab94..17859a3848 100644 --- a/tests/petsc/38.cc +++ b/tests/petsc/38.cc @@ -56,13 +56,13 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/39.cc b/tests/petsc/39.cc index 802b5e5e7f..edfc23649e 100644 --- a/tests/petsc/39.cc +++ b/tests/petsc/39.cc @@ -56,13 +56,13 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/40.cc b/tests/petsc/40.cc index d5d6b05ec3..dccea778f4 100644 --- a/tests/petsc/40.cc +++ b/tests/petsc/40.cc @@ -60,14 +60,14 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); PETScWrappers::Vector x (100); test (v,w,x); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/41.cc b/tests/petsc/41.cc index 359b98163a..b3e0ff93fb 100644 --- a/tests/petsc/41.cc +++ b/tests/petsc/41.cc @@ -56,13 +56,13 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/42.cc b/tests/petsc/42.cc index 7afa81c372..fd5e3251dd 100644 --- a/tests/petsc/42.cc +++ b/tests/petsc/42.cc @@ -56,13 +56,13 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/43.cc b/tests/petsc/43.cc index c82b31e916..8a63a66d97 100644 --- a/tests/petsc/43.cc +++ b/tests/petsc/43.cc @@ -60,14 +60,14 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); PETScWrappers::Vector x (100); test (v,w,x); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/44.cc b/tests/petsc/44.cc index 3a988dc125..09c65d368b 100644 --- a/tests/petsc/44.cc +++ b/tests/petsc/44.cc @@ -64,7 +64,7 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); @@ -72,7 +72,7 @@ int main (int argc,char **argv) PETScWrappers::Vector y (100); test (v,w,x,y); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/45.cc b/tests/petsc/45.cc index a3a7847c9e..a4cbba9ac8 100644 --- a/tests/petsc/45.cc +++ b/tests/petsc/45.cc @@ -56,13 +56,13 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/46.cc b/tests/petsc/46.cc index 1344204d70..c0eea39bb0 100644 --- a/tests/petsc/46.cc +++ b/tests/petsc/46.cc @@ -56,13 +56,13 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/47.cc b/tests/petsc/47.cc index 49ccd8164c..288f22206f 100644 --- a/tests/petsc/47.cc +++ b/tests/petsc/47.cc @@ -60,14 +60,14 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); PETScWrappers::Vector x (100); test (v,w,x); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/48.cc b/tests/petsc/48.cc index 3f503b4b8b..364f0c3864 100644 --- a/tests/petsc/48.cc +++ b/tests/petsc/48.cc @@ -62,14 +62,14 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); PETScWrappers::Vector x (100); test (v,w,x); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/49.cc b/tests/petsc/49.cc index 371417e81b..333c79cf9a 100644 --- a/tests/petsc/49.cc +++ b/tests/petsc/49.cc @@ -53,12 +53,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/50.cc b/tests/petsc/50.cc index 64be5a00aa..5989517f13 100644 --- a/tests/petsc/50.cc +++ b/tests/petsc/50.cc @@ -69,12 +69,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/51.cc b/tests/petsc/51.cc index b1b782edc4..cddd93fcb9 100644 --- a/tests/petsc/51.cc +++ b/tests/petsc/51.cc @@ -54,12 +54,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/52.cc b/tests/petsc/52.cc index dd3e5235ab..d307922191 100644 --- a/tests/petsc/52.cc +++ b/tests/petsc/52.cc @@ -60,14 +60,14 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { std::vector row_lengths (5, 3U); row_lengths.back() = 2; PETScWrappers::SparseMatrix m (5,5,row_lengths); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/55.cc b/tests/petsc/55.cc index c56c669131..68e016fcfa 100644 --- a/tests/petsc/55.cc +++ b/tests/petsc/55.cc @@ -59,12 +59,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/56.cc b/tests/petsc/56.cc index 637d924fe3..ea85ee43d8 100644 --- a/tests/petsc/56.cc +++ b/tests/petsc/56.cc @@ -59,12 +59,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/57.cc b/tests/petsc/57.cc index 7abaed544e..1d51de2c9d 100644 --- a/tests/petsc/57.cc +++ b/tests/petsc/57.cc @@ -57,12 +57,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/58.cc b/tests/petsc/58.cc index 02368c9a32..051c5557a4 100644 --- a/tests/petsc/58.cc +++ b/tests/petsc/58.cc @@ -59,12 +59,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/59.cc b/tests/petsc/59.cc index 488d20c2e4..795ee80be5 100644 --- a/tests/petsc/59.cc +++ b/tests/petsc/59.cc @@ -62,12 +62,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/60.cc b/tests/petsc/60.cc index 517cad9b95..1207af2093 100644 --- a/tests/petsc/60.cc +++ b/tests/petsc/60.cc @@ -59,12 +59,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/61.cc b/tests/petsc/61.cc index 1a3d2a603c..aff76844a7 100644 --- a/tests/petsc/61.cc +++ b/tests/petsc/61.cc @@ -62,12 +62,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/62.cc b/tests/petsc/62.cc index fc233e2432..f7e55ef07c 100644 --- a/tests/petsc/62.cc +++ b/tests/petsc/62.cc @@ -47,12 +47,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix v (100,100,5); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/63.cc b/tests/petsc/63.cc index 7b7ce937bd..6e03baee9f 100644 --- a/tests/petsc/63.cc +++ b/tests/petsc/63.cc @@ -45,12 +45,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix v (100,100,5); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/64.cc b/tests/petsc/64.cc index 47b906f9e8..46d6ad8c38 100644 --- a/tests/petsc/64.cc +++ b/tests/petsc/64.cc @@ -50,7 +50,7 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { const unsigned int n_dofs=420; // check @@ -71,7 +71,7 @@ int main (int argc,char **argv) v2 (mpi_communicator, n_dofs, n_dofs, n_local_dofs, n_local_dofs, 5); test (v2); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/65.cc b/tests/petsc/65.cc index a3545c0d97..58265ebbc6 100644 --- a/tests/petsc/65.cc +++ b/tests/petsc/65.cc @@ -44,11 +44,11 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { test (); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/66.cc b/tests/petsc/66.cc index 4094dbec7b..660d22bde0 100644 --- a/tests/petsc/66.cc +++ b/tests/petsc/66.cc @@ -101,12 +101,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix v (14,14,3); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/67.cc b/tests/petsc/67.cc index 988b5448d0..fc30adc9de 100644 --- a/tests/petsc/67.cc +++ b/tests/petsc/67.cc @@ -107,12 +107,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix v (14,14,3); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/68.cc b/tests/petsc/68.cc index a86620384e..17547b9d06 100644 --- a/tests/petsc/68.cc +++ b/tests/petsc/68.cc @@ -105,12 +105,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix v (14,14,3); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/69.cc b/tests/petsc/69.cc index 8d34de162c..9012db91b3 100644 --- a/tests/petsc/69.cc +++ b/tests/petsc/69.cc @@ -111,12 +111,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::SparseMatrix v (14,14,3); test (v); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/block_vector_iterator_01.cc b/tests/petsc/block_vector_iterator_01.cc index ac75cced63..c36c4a4305 100644 --- a/tests/petsc/block_vector_iterator_01.cc +++ b/tests/petsc/block_vector_iterator_01.cc @@ -84,11 +84,11 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { test (); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/block_vector_iterator_02.cc b/tests/petsc/block_vector_iterator_02.cc index 3a5ae35b05..30ac77d0eb 100644 --- a/tests/petsc/block_vector_iterator_02.cc +++ b/tests/petsc/block_vector_iterator_02.cc @@ -78,11 +78,11 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { test (); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/block_vector_iterator_03.cc b/tests/petsc/block_vector_iterator_03.cc index 8778f7f1a2..f52a184e29 100644 --- a/tests/petsc/block_vector_iterator_03.cc +++ b/tests/petsc/block_vector_iterator_03.cc @@ -329,11 +329,11 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { test (); } - PetscFinalize(); + } catch (std::exception &e) { diff --git a/tests/petsc/deal_solver_01.cc b/tests/petsc/deal_solver_01.cc index 2a54980520..f3fcf6af25 100644 --- a/tests/petsc/deal_solver_01.cc +++ b/tests/petsc/deal_solver_01.cc @@ -65,7 +65,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -92,6 +92,6 @@ int main(int argc, char **argv) check_solve (solver, A,u,f, preconditioner); } GrowingVectorMemory::release_unused_memory (); - PetscFinalize (); + } diff --git a/tests/petsc/deal_solver_02.cc b/tests/petsc/deal_solver_02.cc index fbcf723fb7..664815a62e 100644 --- a/tests/petsc/deal_solver_02.cc +++ b/tests/petsc/deal_solver_02.cc @@ -67,7 +67,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -94,6 +94,6 @@ int main(int argc, char **argv) check_solve (solver, A,u,f, preconditioner); } GrowingVectorMemory::release_unused_memory (); - PetscFinalize (); + } diff --git a/tests/petsc/deal_solver_03.cc b/tests/petsc/deal_solver_03.cc index 8b671a48dc..c9eba8f35b 100644 --- a/tests/petsc/deal_solver_03.cc +++ b/tests/petsc/deal_solver_03.cc @@ -67,7 +67,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -94,6 +94,6 @@ int main(int argc, char **argv) check_solve (solver, A,u,f, preconditioner); } GrowingVectorMemory::release_unused_memory (); - PetscFinalize (); + } diff --git a/tests/petsc/deal_solver_04.cc b/tests/petsc/deal_solver_04.cc index 43dd942f21..1c8bd61130 100644 --- a/tests/petsc/deal_solver_04.cc +++ b/tests/petsc/deal_solver_04.cc @@ -66,7 +66,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -93,6 +93,6 @@ int main(int argc, char **argv) check_solve (solver, A,u,f, preconditioner); } GrowingVectorMemory::release_unused_memory (); - PetscFinalize (); + } diff --git a/tests/petsc/deal_solver_05.cc b/tests/petsc/deal_solver_05.cc index ff8e66ca32..b4a4fc0cb2 100644 --- a/tests/petsc/deal_solver_05.cc +++ b/tests/petsc/deal_solver_05.cc @@ -65,7 +65,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -92,6 +92,6 @@ int main(int argc, char **argv) check_solve (solver, A,u,f, preconditioner); } GrowingVectorMemory::release_unused_memory (); - PetscFinalize (); + } diff --git a/tests/petsc/full_matrix_01.cc b/tests/petsc/full_matrix_01.cc index 25805bc77e..714e1b1d80 100644 --- a/tests/petsc/full_matrix_01.cc +++ b/tests/petsc/full_matrix_01.cc @@ -59,12 +59,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::FullMatrix m (5,5); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_02.cc b/tests/petsc/full_matrix_02.cc index 16b8737823..27f908b711 100644 --- a/tests/petsc/full_matrix_02.cc +++ b/tests/petsc/full_matrix_02.cc @@ -59,12 +59,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::FullMatrix m (5,5); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_04.cc b/tests/petsc/full_matrix_04.cc index faca957832..3e9dc4a57c 100644 --- a/tests/petsc/full_matrix_04.cc +++ b/tests/petsc/full_matrix_04.cc @@ -39,12 +39,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::FullMatrix m (5,5); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_05.cc b/tests/petsc/full_matrix_05.cc index 783dd4f6ac..93b5485f0c 100644 --- a/tests/petsc/full_matrix_05.cc +++ b/tests/petsc/full_matrix_05.cc @@ -55,12 +55,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::FullMatrix m (5,5); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_06.cc b/tests/petsc/full_matrix_06.cc index 743ca06270..bb13f07bc9 100644 --- a/tests/petsc/full_matrix_06.cc +++ b/tests/petsc/full_matrix_06.cc @@ -50,12 +50,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::FullMatrix m (5,5); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_07.cc b/tests/petsc/full_matrix_07.cc index a2aba52e53..7e12375dcb 100644 --- a/tests/petsc/full_matrix_07.cc +++ b/tests/petsc/full_matrix_07.cc @@ -50,12 +50,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::FullMatrix m (5,5); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_08.cc b/tests/petsc/full_matrix_08.cc index 79496d40a2..9e164150eb 100644 --- a/tests/petsc/full_matrix_08.cc +++ b/tests/petsc/full_matrix_08.cc @@ -55,12 +55,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::FullMatrix m (5,5); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_09.cc b/tests/petsc/full_matrix_09.cc index 9dd58d3651..fdce56f818 100644 --- a/tests/petsc/full_matrix_09.cc +++ b/tests/petsc/full_matrix_09.cc @@ -62,12 +62,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::FullMatrix m (5,5); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_10.cc b/tests/petsc/full_matrix_10.cc index 76b444bcb2..c60fa17b8a 100644 --- a/tests/petsc/full_matrix_10.cc +++ b/tests/petsc/full_matrix_10.cc @@ -62,12 +62,12 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::FullMatrix m (5,5); test (m); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_iterator_01.cc b/tests/petsc/full_matrix_iterator_01.cc index 7d5271db71..7a4fc7784f 100644 --- a/tests/petsc/full_matrix_iterator_01.cc +++ b/tests/petsc/full_matrix_iterator_01.cc @@ -48,11 +48,11 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { test (); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_vector_01.cc b/tests/petsc/full_matrix_vector_01.cc index 61e8c9830d..0d1c727ad0 100644 --- a/tests/petsc/full_matrix_vector_01.cc +++ b/tests/petsc/full_matrix_vector_01.cc @@ -65,13 +65,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_vector_02.cc b/tests/petsc/full_matrix_vector_02.cc index b26242113b..c793194354 100644 --- a/tests/petsc/full_matrix_vector_02.cc +++ b/tests/petsc/full_matrix_vector_02.cc @@ -65,13 +65,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_vector_03.cc b/tests/petsc/full_matrix_vector_03.cc index ecef104ac1..bdeee37095 100644 --- a/tests/petsc/full_matrix_vector_03.cc +++ b/tests/petsc/full_matrix_vector_03.cc @@ -68,13 +68,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_vector_04.cc b/tests/petsc/full_matrix_vector_04.cc index e05e641bf7..e3d56facff 100644 --- a/tests/petsc/full_matrix_vector_04.cc +++ b/tests/petsc/full_matrix_vector_04.cc @@ -68,13 +68,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_vector_05.cc b/tests/petsc/full_matrix_vector_05.cc index cdb39b3963..27258c05e3 100644 --- a/tests/petsc/full_matrix_vector_05.cc +++ b/tests/petsc/full_matrix_vector_05.cc @@ -71,13 +71,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_vector_06.cc b/tests/petsc/full_matrix_vector_06.cc index 792b61d97d..ec0caee880 100644 --- a/tests/petsc/full_matrix_vector_06.cc +++ b/tests/petsc/full_matrix_vector_06.cc @@ -63,12 +63,12 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (30); test (v); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/full_matrix_vector_07.cc b/tests/petsc/full_matrix_vector_07.cc index 28ef15d78c..5b0668b6ed 100644 --- a/tests/petsc/full_matrix_vector_07.cc +++ b/tests/petsc/full_matrix_vector_07.cc @@ -73,14 +73,14 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); PETScWrappers::Vector x (100); test (v,w,x); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/parallel_sparse_matrix_01.cc b/tests/petsc/parallel_sparse_matrix_01.cc index 3b571c1dae..bc9a4c91c3 100644 --- a/tests/petsc/parallel_sparse_matrix_01.cc +++ b/tests/petsc/parallel_sparse_matrix_01.cc @@ -122,9 +122,9 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); test (); - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/slowness_01.cc b/tests/petsc/slowness_01.cc index 0c69d4331c..c454cd0acd 100644 --- a/tests/petsc/slowness_01.cc +++ b/tests/petsc/slowness_01.cc @@ -112,11 +112,11 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { test (); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/slowness_02.cc b/tests/petsc/slowness_02.cc index 10a6ca8611..827d0ca60b 100644 --- a/tests/petsc/slowness_02.cc +++ b/tests/petsc/slowness_02.cc @@ -83,11 +83,11 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { test (); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/slowness_03.cc b/tests/petsc/slowness_03.cc index 34c93c96e9..490fc19592 100644 --- a/tests/petsc/slowness_03.cc +++ b/tests/petsc/slowness_03.cc @@ -86,11 +86,11 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { test (); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/slowness_04.cc b/tests/petsc/slowness_04.cc index 238f502df0..7db3ddeecf 100644 --- a/tests/petsc/slowness_04.cc +++ b/tests/petsc/slowness_04.cc @@ -117,11 +117,11 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { test (); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/solver_01.cc b/tests/petsc/solver_01.cc index d2d04db0b4..bea19c269b 100644 --- a/tests/petsc/solver_01.cc +++ b/tests/petsc/solver_01.cc @@ -62,7 +62,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -87,6 +87,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_02.cc b/tests/petsc/solver_02.cc index 389d822166..c2a0ef75c1 100644 --- a/tests/petsc/solver_02.cc +++ b/tests/petsc/solver_02.cc @@ -61,7 +61,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -86,6 +86,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03.cc b/tests/petsc/solver_03.cc index 81a2427d56..9b3eda386d 100644 --- a/tests/petsc/solver_03.cc +++ b/tests/petsc/solver_03.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03_mf.cc b/tests/petsc/solver_03_mf.cc index 4037e28989..e44524c31a 100644 --- a/tests/petsc/solver_03_mf.cc +++ b/tests/petsc/solver_03_mf.cc @@ -61,7 +61,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -83,6 +83,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionNone preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03_precondition_boomeramg.cc b/tests/petsc/solver_03_precondition_boomeramg.cc index 65d9d1f07c..bab069141f 100644 --- a/tests/petsc/solver_03_precondition_boomeramg.cc +++ b/tests/petsc/solver_03_precondition_boomeramg.cc @@ -61,7 +61,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -86,6 +86,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionBoomerAMG preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc b/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc index 9b9441d6dc..2d2bb5a68f 100644 --- a/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc +++ b/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc @@ -62,7 +62,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -87,6 +87,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionBoomerAMG preconditioner(A, true); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03_precondition_eisenstat.cc b/tests/petsc/solver_03_precondition_eisenstat.cc index 087b43ca2e..a643bfdccd 100644 --- a/tests/petsc/solver_03_precondition_eisenstat.cc +++ b/tests/petsc/solver_03_precondition_eisenstat.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionEisenstat preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03_precondition_icc.cc b/tests/petsc/solver_03_precondition_icc.cc index 1fe7554a30..1a9a561b79 100644 --- a/tests/petsc/solver_03_precondition_icc.cc +++ b/tests/petsc/solver_03_precondition_icc.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionICC preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03_precondition_ilu.cc b/tests/petsc/solver_03_precondition_ilu.cc index 8912039cd5..960eeee3c4 100644 --- a/tests/petsc/solver_03_precondition_ilu.cc +++ b/tests/petsc/solver_03_precondition_ilu.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionILU preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03_precondition_lu.cc b/tests/petsc/solver_03_precondition_lu.cc index bbcd02309c..42e2939601 100644 --- a/tests/petsc/solver_03_precondition_lu.cc +++ b/tests/petsc/solver_03_precondition_lu.cc @@ -67,7 +67,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -92,6 +92,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionLU preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03_precondition_parasails.cc b/tests/petsc/solver_03_precondition_parasails.cc index 27db1117a1..42ce6c48ed 100644 --- a/tests/petsc/solver_03_precondition_parasails.cc +++ b/tests/petsc/solver_03_precondition_parasails.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionParaSails preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03_precondition_sor.cc b/tests/petsc/solver_03_precondition_sor.cc index 3bdc29fa41..3f5d7aa2e1 100644 --- a/tests/petsc/solver_03_precondition_sor.cc +++ b/tests/petsc/solver_03_precondition_sor.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionSOR preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_03_precondition_ssor.cc b/tests/petsc/solver_03_precondition_ssor.cc index 450f7a6e2d..1bbaa3a0bd 100644 --- a/tests/petsc/solver_03_precondition_ssor.cc +++ b/tests/petsc/solver_03_precondition_ssor.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionSSOR preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_04.cc b/tests/petsc/solver_04.cc index 8a5f80ebd3..5940c14ce7 100644 --- a/tests/petsc/solver_04.cc +++ b/tests/petsc/solver_04.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_05.cc b/tests/petsc/solver_05.cc index 6db5bbfd2e..3367ea4ec5 100644 --- a/tests/petsc/solver_05.cc +++ b/tests/petsc/solver_05.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_06.cc b/tests/petsc/solver_06.cc index 67143da3ef..32460c8047 100644 --- a/tests/petsc/solver_06.cc +++ b/tests/petsc/solver_06.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_07.cc b/tests/petsc/solver_07.cc index f43db56b05..e057f85128 100644 --- a/tests/petsc/solver_07.cc +++ b/tests/petsc/solver_07.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_08.cc b/tests/petsc/solver_08.cc index 7552cb41ef..96df650e0e 100644 --- a/tests/petsc/solver_08.cc +++ b/tests/petsc/solver_08.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_09.cc b/tests/petsc/solver_09.cc index dc7a33497c..3d111c8370 100644 --- a/tests/petsc/solver_09.cc +++ b/tests/petsc/solver_09.cc @@ -64,7 +64,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -89,6 +89,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_10.cc b/tests/petsc/solver_10.cc index 91f9b6f95f..52d79c0fd2 100644 --- a/tests/petsc/solver_10.cc +++ b/tests/petsc/solver_10.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -85,6 +85,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_11.cc b/tests/petsc/solver_11.cc index 549cc7e655..a93f1e3d26 100644 --- a/tests/petsc/solver_11.cc +++ b/tests/petsc/solver_11.cc @@ -61,7 +61,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -86,6 +86,6 @@ int main(int argc, char **argv) PETScWrappers::PreconditionJacobi preconditioner(A); check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_12.cc b/tests/petsc/solver_12.cc index 8a265095c2..55a9e1f062 100644 --- a/tests/petsc/solver_12.cc +++ b/tests/petsc/solver_12.cc @@ -53,7 +53,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -82,6 +82,6 @@ int main(int argc, char **argv) //run twice because this errored out at some point check_solve (solver, A,u,f, preconditioner); } - PetscFinalize (); + } diff --git a/tests/petsc/solver_13.cc b/tests/petsc/solver_13.cc index b1c4a5f7f8..ce7acda6f8 100644 --- a/tests/petsc/solver_13.cc +++ b/tests/petsc/solver_13.cc @@ -50,7 +50,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { SolverControl control(100, 1.e-3); @@ -91,6 +91,6 @@ int main(int argc, char **argv) preconditioner.vmult(t, u); deallog << t.l2_norm() << std::endl; } - PetscFinalize (); + } diff --git a/tests/petsc/sparse_direct_mumps.cc b/tests/petsc/sparse_direct_mumps.cc index c368f0eb95..53abdfa485 100644 --- a/tests/petsc/sparse_direct_mumps.cc +++ b/tests/petsc/sparse_direct_mumps.cc @@ -60,7 +60,7 @@ int main(int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { const unsigned int size = 32; unsigned int dim = (size-1)*(size-1); @@ -89,6 +89,6 @@ int main(int argc, char **argv) deallog << "residual = " << A.residual (tmp, u, f) << std::endl; } - PetscFinalize (); + } diff --git a/tests/petsc/sparse_matrix_01.cc b/tests/petsc/sparse_matrix_01.cc index d91d62ef80..1220d69fcc 100644 --- a/tests/petsc/sparse_matrix_01.cc +++ b/tests/petsc/sparse_matrix_01.cc @@ -73,7 +73,7 @@ int main (int argc, char **argv) deallog.depth_console(0); deallog.threshold_double(1.e-10); - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); test (); - PetscFinalize (); + } diff --git a/tests/petsc/sparse_matrix_iterator_01.cc b/tests/petsc/sparse_matrix_iterator_01.cc index b6c8c2adef..43499ebf2b 100644 --- a/tests/petsc/sparse_matrix_iterator_01.cc +++ b/tests/petsc/sparse_matrix_iterator_01.cc @@ -48,11 +48,11 @@ int main (int argc,char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { test (); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/sparse_matrix_vector_01.cc b/tests/petsc/sparse_matrix_vector_01.cc index 74ea05ffa2..f5511b530d 100644 --- a/tests/petsc/sparse_matrix_vector_01.cc +++ b/tests/petsc/sparse_matrix_vector_01.cc @@ -65,13 +65,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/sparse_matrix_vector_02.cc b/tests/petsc/sparse_matrix_vector_02.cc index 5b3fbb87be..da4c39509a 100644 --- a/tests/petsc/sparse_matrix_vector_02.cc +++ b/tests/petsc/sparse_matrix_vector_02.cc @@ -65,13 +65,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/sparse_matrix_vector_03.cc b/tests/petsc/sparse_matrix_vector_03.cc index 414256ab76..ee9690edbb 100644 --- a/tests/petsc/sparse_matrix_vector_03.cc +++ b/tests/petsc/sparse_matrix_vector_03.cc @@ -68,13 +68,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/sparse_matrix_vector_04.cc b/tests/petsc/sparse_matrix_vector_04.cc index f0ff424784..d85a372f04 100644 --- a/tests/petsc/sparse_matrix_vector_04.cc +++ b/tests/petsc/sparse_matrix_vector_04.cc @@ -68,13 +68,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/sparse_matrix_vector_05.cc b/tests/petsc/sparse_matrix_vector_05.cc index a91b332a42..084367fb5b 100644 --- a/tests/petsc/sparse_matrix_vector_05.cc +++ b/tests/petsc/sparse_matrix_vector_05.cc @@ -71,13 +71,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/sparse_matrix_vector_06.cc b/tests/petsc/sparse_matrix_vector_06.cc index 83a15c7e2a..768daa3893 100644 --- a/tests/petsc/sparse_matrix_vector_06.cc +++ b/tests/petsc/sparse_matrix_vector_06.cc @@ -63,12 +63,12 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (30); test (v); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/sparse_matrix_vector_07.cc b/tests/petsc/sparse_matrix_vector_07.cc index 74158129f4..7f759ec6d6 100644 --- a/tests/petsc/sparse_matrix_vector_07.cc +++ b/tests/petsc/sparse_matrix_vector_07.cc @@ -73,14 +73,14 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); PETScWrappers::Vector x (100); test (v,w,x); } - PetscFinalize (); + } catch (std::exception &exc) { diff --git a/tests/petsc/vector_assign_01.cc b/tests/petsc/vector_assign_01.cc index 6155071372..5932051d0c 100644 --- a/tests/petsc/vector_assign_01.cc +++ b/tests/petsc/vector_assign_01.cc @@ -55,13 +55,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/vector_assign_02.cc b/tests/petsc/vector_assign_02.cc index 03778696dc..f03d34e190 100644 --- a/tests/petsc/vector_assign_02.cc +++ b/tests/petsc/vector_assign_02.cc @@ -54,13 +54,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/vector_equality_1.cc b/tests/petsc/vector_equality_1.cc index dc4159c9dd..fb4b6b8198 100644 --- a/tests/petsc/vector_equality_1.cc +++ b/tests/petsc/vector_equality_1.cc @@ -50,13 +50,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/vector_equality_2.cc b/tests/petsc/vector_equality_2.cc index dd180be924..d9549b89d7 100644 --- a/tests/petsc/vector_equality_2.cc +++ b/tests/petsc/vector_equality_2.cc @@ -52,13 +52,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/vector_equality_3.cc b/tests/petsc/vector_equality_3.cc index 1419c68c64..3289cc2fc3 100644 --- a/tests/petsc/vector_equality_3.cc +++ b/tests/petsc/vector_equality_3.cc @@ -50,13 +50,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/vector_equality_4.cc b/tests/petsc/vector_equality_4.cc index ce9b26c533..180e2f136e 100644 --- a/tests/petsc/vector_equality_4.cc +++ b/tests/petsc/vector_equality_4.cc @@ -52,13 +52,13 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); { PETScWrappers::Vector v (100); PETScWrappers::Vector w (100); test (v,w); } - PetscFinalize(); + } catch (std::exception &exc) { diff --git a/tests/petsc/vector_wrap_01.cc b/tests/petsc/vector_wrap_01.cc index 245a69d9d8..07a54d4347 100644 --- a/tests/petsc/vector_wrap_01.cc +++ b/tests/petsc/vector_wrap_01.cc @@ -52,7 +52,7 @@ int main (int argc, char **argv) try { - PetscInitialize(&argc,&argv,0,0); + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); Vec vpetsc; int ierr = VecCreateSeq (PETSC_COMM_SELF, 100, &vpetsc); AssertThrow (ierr == 0, ExcPETScError(ierr)); @@ -70,7 +70,7 @@ int main (int argc, char **argv) AssertThrow (ierr == 0, ExcPETScError(ierr)); - PetscFinalize(); + } catch (std::exception &exc) {