<div dir="ltr"><div><div>Mark -<br><br>I can reproduce on a simple single processor example. It appears that the MatMFFD is being used within GAMG instead of the preconditioning matrix. Therefore, SNESComputeFunction is being called at each chebychev iteration on the coarse grid. For instance, I get backtraces like:<br>
<br>#0 SNESComputeFunction (snes=0x870250, x=0xb1a020, y=0xc5e150) at /home/prbrune/packages/petsc-dev/src/snes/interface/snes.c:1993<br>#1 0x00007ffff68964cf in MatMult_MFFD (mat=0xa82e30, a=0xc54350, y=0xc5e150) at /home/prbrune/packages/petsc-dev/src/mat/impls/mffd/mffd.c:404<br>
#2 0x00007ffff6692070 in MatMult (mat=0xa82e30, x=0xc54350, y=0xc5e150) at /home/prbrune/packages/petsc-dev/src/mat/interface/matrix.c:2156<br>#3 0x00007ffff705fa81 in KSP_MatMult (ksp=0xbf6410, A=0xa82e30, x=0xc54350, y=0xc5e150) at /home/prbrune/packages/petsc-dev/include/petsc-private/kspimpl.h:198<br>
#4 0x00007ffff706686d in KSPSolve_Chebyshev (ksp=0xbf6410) at /home/prbrune/packages/petsc-dev/src/ksp/ksp/impls/cheby/cheby.c:502<br>#5 0x00007ffff6f7c53c in KSPSolve (ksp=0xbf6410, b=0xa6e9a0, x=0xb41990) at /home/prbrune/packages/petsc-dev/src/ksp/ksp/interface/itfunc.c:430<br>
#6 0x00007ffff6f4d9ae in PCMGMCycle_Private (pc=0xa22bf0, mglevelsin=0xbd72c8, reason=0x0) at /home/prbrune/packages/petsc-dev/src/ksp/pc/impls/mg/mg.c:19<br>#7 0x00007ffff6f52280 in PCApply_MG (pc=0xa22bf0, b=0xa6e9a0, x=0xb41990) at /home/prbrune/packages/petsc-dev/src/ksp/pc/impls/mg/mg.c:330<br>
#8 0x00007ffff6e32b23 in PCApply (pc=0xa22bf0, x=0xa6e9a0, y=0xb41990) at /home/prbrune/packages/petsc-dev/src/ksp/pc/interface/precon.c:390<br>#9 0x00007ffff6fa8a4d in KSP_PCApply (ksp=0x9e60f0, x=0xa6e9a0, y=0xb41990) at /home/prbrune/packages/petsc-dev/include/petsc-private/kspimpl.h:221<br>
#10 0x00007ffff6fa98f3 in KSPInitialResidual (ksp=0x9e60f0, vsoln=0xa79030, vt1=0xb2d4f0, vt2=0xb37b90, vres=0xb41990, vb=0xa6e9a0)<br> at /home/prbrune/packages/petsc-dev/src/ksp/ksp/interface/itres.c:64<br>#11 0x00007ffff7031a88 in KSPSolve_GMRES (ksp=0x9e60f0) at /home/prbrune/packages/petsc-dev/src/ksp/ksp/impls/gmres/gmres.c:234<br>
#12 0x00007ffff6f7c53c in KSPSolve (ksp=0x9e60f0, b=0xa6e9a0, x=0xa79030) at /home/prbrune/packages/petsc-dev/src/ksp/ksp/interface/itfunc.c:430<br>#13 0x00007ffff714b1ea in SNES_KSPSolve (snes=0x870250, ksp=0x9e60f0, b=0xa6e9a0, x=0xa79030) at /home/prbrune/packages/petsc-dev/src/snes/interface/snes.c:4418<br>
#14 0x00007ffff70d8ec5 in SNESSolve_NEWTONLS (snes=0x870250) at /home/prbrune/packages/petsc-dev/src/snes/impls/ls/ls.c:217<br>#15 0x00007ffff7142e9b in SNESSolve (snes=0x870250, b=0x0, x=0xa24840) at /home/prbrune/packages/petsc-dev/src/snes/interface/snes.c:3649<br>
#16 0x0000000000402c83 in main (argc=9, argv=0x7fffffffde08) at ex5.c:157<br><br></div>Is the wrong matrix getting sent to the smoothers somewhere?<br><br></div>- Peter<br><div><div><br><br><br><br><br>
</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 6, 2013 at 11:25 AM, Mark F. Adams <span dir="ltr"><<a href="mailto:mark.adams@columbia.edu" target="_blank">mark.adams@columbia.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a SNES solve if I switch the pc_type between gamg and hypre I get some odd results:<br>
<br>
1) The gamg solve takes two more Newton iterations and converges for a different reason. This could be OK, but it seems odd.<br>
<br>
2) The more mystifying issue is that the gamg solve seems to take just a few more total linear solve iterations but does about 5x as many function evaluations.<br>
<br>
I've attached two log files. Any ideas what is going on here? It seems like it should be impossible for the choice of PC to effect the nonlinear solve like this.<br>
<span class="HOEnZb"><font color="#888888"><br>
Mark<br>
</font></span></blockquote></div><br></div>