This is a likely culprit: (gdb) bt #0 KSPSetOperators (ksp=0xbf6410, Amat=0xa82e30, Pmat=0xaac190, flag=DIFFERENT_NONZERO_PATTERN) at /home/prbrune/packages/petsc-dev/src/ksp/ksp/interface/itcreate.c:540 #1 0x00007ffff6f554cf in PCSetUp_MG (pc=0xa22bf0) at /home/prbrune/packages/petsc-dev/src/ksp/pc/impls/mg/mg.c:572 #2 0x00007ffff6ef2f07 in PCSetUp_GAMG (pc=0xa22bf0) at /home/prbrune/packages/petsc-dev/src/ksp/pc/impls/gamg/gamg.c:974 #3 0x00007ffff6e3936e in PCSetUp (pc=0xa22bf0) at /home/prbrune/packages/petsc-dev/src/ksp/pc/interface/precon.c:838 #4 0x00007ffff6f7adb7 in KSPSetUp (ksp=0x9e60f0) at /home/prbrune/packages/petsc-dev/src/ksp/ksp/interface/itfunc.c:278 #5 0x00007ffff6f7bc7d in KSPSolve (ksp=0x9e60f0, b=0xa6e9a0, x=0xa79030) at /home/prbrune/packages/petsc-dev/src/ksp/ksp/interface/itfunc.c:388 #6 0x00007ffff714b1ea in SNES_KSPSolve (snes=0x870250, ksp=0x9e60f0, b=0xa6e9a0, x=0xa79030) at /home/prbrune/packages/petsc-dev/src/snes/interface/snes.c:4418 #7 0x00007ffff70d8ec5 in SNESSolve_NEWTONLS (snes=0x870250) at /home/prbrune/packages/petsc-dev/src/snes/impls/ls/ls.c:217 #8 0x00007ffff7142e9b in SNESSolve (snes=0x870250, b=0x0, x=0xa24840) at /home/prbrune/packages/petsc-dev/src/snes/interface/snes.c:3649 #9 0x0000000000402c83 in main (argc=9, argv=0x7fffffffde08) at ex5.c:157 (gdb) up #1 0x00007ffff6f554cf in PCSetUp_MG (pc=0xa22bf0) at /home/prbrune/packages/petsc-dev/src/ksp/pc/impls/mg/mg.c:572 572 ierr = KSPSetOperators(mglevels[n-1]->smoothd,pc->mat,pc->pmat,pc->flag);CHKERRQ(ierr);
The matrix on the smoother gets RESET to the non-preconditioner matrix in the final call to PCSetUp_MG in PCSetUp_GAMG. You could just reset it after that, like you do with the PC type. - Peter On Wed, Mar 6, 2013 at 4:31 PM, Mark F. Adams <mark.adams at columbia.edu>wrote: > > > > It looks like SNES is not getting set it's "master" Jacobian. If you > run the same code with hypre does it also hit this create? > > > MatCreate_MFFD is called just once with gamg and hypre. It looks like > Cheby is using the outside operator instead of the pre_op. This could be > desirable but I don't want it here. I'll keep digging. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130306/f1a9fe87/attachment.html>
