From e109d5dfb34c6f8471e9731307966a13b2007135 Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 7 Oct 2004 19:45:37 +0000 Subject: [PATCH] New test and add comment to old one. git-svn-id: https://svn.dealii.org/trunk@9696 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/petsc_64.cc | 4 +- tests/bits/petsc_65.cc | 75 +++++++++++++++++++ .../bits/petsc_65.output | 2 + 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 tests/bits/petsc_65.cc create mode 100644 tests/results/i686-pc-linux-gnu+gcc3.2/bits/petsc_65.output diff --git a/tests/bits/petsc_64.cc b/tests/bits/petsc_64.cc index c5dbdde11e..afedd48c84 100644 --- a/tests/bits/petsc_64.cc +++ b/tests/bits/petsc_64.cc @@ -12,7 +12,9 @@ //---------------------------- petsc_64.cc --------------------------- -// This test should be run on multiple processors +// This test should be run on multiple processors. note that this test also +// started to fail with the upgrade to petsc 2.2.1 which required a fix in +// PETScWrappers::MatrixBase::operator= #include "../tests.h" diff --git a/tests/bits/petsc_65.cc b/tests/bits/petsc_65.cc new file mode 100644 index 0000000000..0ce1253c76 --- /dev/null +++ b/tests/bits/petsc_65.cc @@ -0,0 +1,75 @@ +//---------------------------- petsc_65.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2004 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- petsc_65.cc --------------------------- + + +// This test used to fail after upgrading to petsc 2.2.1 + + +#include "../tests.h" +#include + +#include +#include +#include + + +void test () +{ + PETScWrappers::MPI::Vector v(PETSC_COMM_WORLD, 100, 100); + v(0) = 1; + v = 0; + + deallog << "OK" << std::endl; +} + + + +int main (int argc,char **argv) +{ + std::ofstream logfile("petsc_65.output"); + deallog.attach(logfile); + deallog.depth_console(0); + + try + { + PetscInitialize(&argc,&argv,0,0); + { + test (); + } + PetscFinalize(); + } + catch (std::exception &exc) + { + std::cerr << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Exception on processing: " << std::endl + << exc.what() << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + + return 1; + } + catch (...) + { + std::cerr << std::endl << std::endl + << "----------------------------------------------------" + << std::endl; + std::cerr << "Unknown exception!" << std::endl + << "Aborting!" << std::endl + << "----------------------------------------------------" + << std::endl; + return 1; + }; +} diff --git a/tests/results/i686-pc-linux-gnu+gcc3.2/bits/petsc_65.output b/tests/results/i686-pc-linux-gnu+gcc3.2/bits/petsc_65.output new file mode 100644 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/results/i686-pc-linux-gnu+gcc3.2/bits/petsc_65.output @@ -0,0 +1,2 @@ + +DEAL::OK -- 2.39.5