Osman,
> I am trying to build the new version with petsc-2.3.3-p8. Configure find
> it all ok, but make all fails quickly:
> [...]
Right, how embarrassing :-( We focused on making things work with PETSc
3.0.0 and apparently got the older versions wrong.
I think the attached patch should probably help. Can you try?
Thanks
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.tamu.edu/~bangerth/
Index: lac/source/petsc_precondition.cc
===================================================================
--- lac/source/petsc_precondition.cc (revision 18760)
+++ lac/source/petsc_precondition.cc (revision 18761)
@@ -2,7 +2,7 @@
// $Id$
// Version: $Name$
//
-// Copyright (C) 2004, 2006, 2008 by the deal.II authors
+// Copyright (C) 2004, 2006, 2008, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
@@ -234,7 +234,10 @@
AssertThrow (ierr == 0, ExcPETScError(ierr));
// then set flags
-#if (PETSC_VERSION_MAJOR == 2) && (PETSC_VERSION_MINOR < 3) && (PETSC_VERSION_SUBMINOR < 1)
+#if ((PETSC_VERSION_MAJOR == 2) && \
+ ((PETSC_VERSION_MINOR < 3) || \
+ ((PETSC_VERSION_MINOR == 3) && \
+ (PETSC_VERSION_SUBMINOR < 1))))
PCICCSetLevels (pc, additional_data.levels);
#else
PCFactorSetLevels (pc, additional_data.levels);
@@ -274,7 +277,10 @@
AssertThrow (ierr == 0, ExcPETScError(ierr));
// then set flags
-#if (PETSC_VERSION_MAJOR == 2) && (PETSC_VERSION_MINOR < 3) && (PETSC_VERSION_SUBMINOR < 1)
+#if ((PETSC_VERSION_MAJOR == 2) && \
+ ((PETSC_VERSION_MINOR < 3) || \
+ ((PETSC_VERSION_MINOR == 3) && \
+ (PETSC_VERSION_SUBMINOR < 1))))
PCILUSetLevels (pc, additional_data.levels);
#else
PCFactorSetLevels (pc, additional_data.levels);
@@ -318,7 +324,10 @@
AssertThrow (ierr == 0, ExcPETScError(ierr));
// set flags as given
-#if (PETSC_VERSION_MAJOR == 2) && (PETSC_VERSION_MINOR >= 3) && (PETSC_VERSION_SUBMINOR >= 1)
+#if ((PETSC_VERSION_MAJOR == 2) && \
+ ((PETSC_VERSION_MINOR < 3) || \
+ ((PETSC_VERSION_MINOR == 3) && \
+ (PETSC_VERSION_SUBMINOR < 1))))
ierr = PCLUSetPivoting (pc, additional_data.pivoting);
#else
ierr = PCFactorSetPivoting (pc, additional_data.pivoting);
Index: lac/source/petsc_matrix_base.cc
===================================================================
--- lac/source/petsc_matrix_base.cc (revision 18760)
+++ lac/source/petsc_matrix_base.cc (revision 18761)
@@ -2,7 +2,7 @@
// $Id$
// Version: $Name$
//
-// Copyright (C) 2004, 2005, 2006, 2008 by the deal.II authors
+// Copyright (C) 2004, 2005, 2006, 2008, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
@@ -553,10 +553,13 @@
MatrixBase::is_hermitian (const double tolerance)
{
PetscTruth truth;
- // First flush PETSc caches
+ // First flush PETSc caches
compress ();
-#if (PETSC_VERSION_MAJOR <= 2)
+#if (PETSC_VERSION_MAJOR <= 2)
+ // avoid warning about unused variables
+ (void) tolerance;
+
MatIsHermitian (matrix, &truth);
#else
MatIsHermitian (matrix, tolerance, &truth);
Index: lac/include/lac/petsc_vector.h
===================================================================
--- lac/include/lac/petsc_vector.h (revision 18760)
+++ lac/include/lac/petsc_vector.h (revision 18761)
@@ -2,7 +2,7 @@
// $Id$
// Version: $Name$
//
-// Copyright (C) 2004, 2005, 2006, 2007 by the deal.II authors
+// Copyright (C) 2004, 2005, 2006, 2007, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
@@ -286,9 +286,9 @@
AssertThrow (ierr == 0, ExcPETScError(ierr));
#if ((PETSC_VERSION_MAJOR == 2) && \
- (PETSC_VERSION_MINOR < 3) && \
- (PETSC_VERSION_SUBMINOR < 3))
-
+ ((PETSC_VERSION_MINOR < 3) || \
+ ((PETSC_VERSION_MINOR == 3) && \
+ (PETSC_VERSION_SUBMINOR < 3))))
ierr = VecScatterBegin (static_cast<const Vec &>(v), vector,
INSERT_VALUES, SCATTER_FORWARD, ctx);
AssertThrow (ierr == 0, ExcPETScError(ierr));
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii