//---------------------------- 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"
--- /dev/null
+//---------------------------- 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 <lac/petsc_parallel_vector.h>
+
+#include <fstream>
+#include <iostream>
+#include <vector>
+
+
+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;
+ };
+}