Thanks Jed.... PCReset() somewhat fixed it... but now I get this:PETSC ERROR: Error in external library!PETSC ERROR: Error in HYPRE_IJMatrixAssemble()!...PETSC ERROR: MatHYPRE_IJMatrixFastCopy_SeqAIJ() line 183 in src/dm/impls/da/hypre/mhyp.cPETSC ERROR: MatHYPRE_IJMatrixCopy() line 127 in src/dm/impls/da/hypre/mhyp.cPETSC ERROR: PCSetUp_HYPRE() line 118 in src/ksp/pc/impls/hypre/hypre.cPETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.cPETSC ERROR: PCApply() line 380 in src/ksp/pc/interface/precon.cPETSC ERROR: apply() line 53 in "unknowndirectory/"src/numerics/petsc_preconditioner.CLooks like maybe PCReset() doesn't work properly with Hypre?As for why this worked before and isn't now... I have no idea. We were definitely changing the system size all the time with adaptivity... and never saw this before...DerekOn Mon, Feb 4, 2013 at 2:56 PM, Jed Brown <firstname.lastname@example.org> wrote:
On Mon, Feb 4, 2013 at 3:44 PM, Derek Gaston <email@example.com> wrote:
After updating to Petsc 3.3 (and the new libMesh... so it's not clear where the error is). One of our fancier preconditioning routines that relies on matrices added using system.add_matrix() calls is failing when we try to apply the preconditioner with an error that says:PETSC ERROR: PCSetOperators() line 1049 in src/ksp/pc/interface/precon.c Cannot change local size of Amat after use old sizes 9 9 new sizes 25 25This is in an adaptivity problem that starts out with 2x2 quads (hence the 9x9 nature of the original matrix) and is being adapted (25x25 sounds right).Anyone seen this before? Is this some new checking in PETSc that is getting tripped...PETSc has never supported changing the system size arbitrarily, but if you set the matrix and changed it _before_ setting up the preconditioner, you would have been okay in the past. We likely added the check when we added PCReset (and KSPReset, etc). This tells PETSc to rebuild any size-dependent structures, but does not change configuration. If you call this before setting a new operator with different sizes, you should be fine.If the code worked before, perhaps you never used the PC to solve a smaller system before calling PCSetOperators() with a new system.------------------------------------------------------------------------------or is libMesh possibly not resizing these matrices correctly?I'll provide more information as I have it... I just thought I would see if anyone had run into this before I get too deep in here...Derek
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
Libmesh-devel mailing list