On Wed, Oct 28, 2009 at 3:32 PM, Lukasz Kaczmarczyk <span dir="ltr">&lt;<a href="mailto:likask@civil.gla.ac.uk">likask@civil.gla.ac.uk</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I will switch off monitor after first linear solution phase using KSPMonitorCancel. SNESSetFromOptions should set up it once again<br>
</blockquote>
Unfortunately this is not working.<br></blockquote><div><br>Can you reproduce this with an example, like SNES ex5?<br><br>  Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 28 Oct 2009, at 16:40, Barry Smith &lt;<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>&gt; wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
 You are calling SNESSetFromOptions() or KSPSetFromOptions() twice. If you call it once the problem won&#39;t appear.<br>
<br>
 There is an extremely ugly hack that is implemented for the default monitor, but not other monitors, to prevent this double printing. Whoever wrote this ugly hack should have done it properly.<br>
<br>
 Barry<br>
<br>
On Oct 28, 2009, at 2:39 AM, Lukasz Kaczmarczyk wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Matt<br>
<br>
I add monitor from options only.<br>
<br>
Pleas note that for default KSP monitor a norm of preconditioned residual is printed only once. Problem exists when I monitor true residuals.<br>
<br>
Regards,<br>
Lukasz<br>
<br>
<br>
<br>
On 27 Oct 2009, at 23:23, Matthew Knepley &lt;<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>&gt; wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It is possible to add the monitor twice. Are you sure this did not happen?<br>
<br>
Thanks,<br>
<br>
  Matt<br>
<br>
On Tue, Oct 27, 2009 at 6:19 PM, Lukasz Kaczmarczyk &lt;<a href="mailto:likask@civil.gla.ac.uk" target="_blank">likask@civil.gla.ac.uk</a>&gt; wrote:<br>
Hello,<br>
<br>
I have noticed minor problem, potentially bug. For nonlinear analysis with SNES and option -ksp_monitor_true_residual I get<br>
0 Norm Res_strain 9.36e-12 Norm Res_stress 1.43e-05 Internal its   1<br>
0 SNES Function norm 1.428489691212e-05<br>
 0 KSP preconditioned resid norm 7.213823259362e-04 true resid norm 1.428489691212e-05 ||Ae||/||Ax|| 1.000000000000e+00<br>
 0 KSP preconditioned resid norm 7.213823259362e-04 true resid norm 1.428489691212e-05 ||Ae||/||Ax|| 1.000000000000e+00<br>
 1 KSP preconditioned resid norm 4.903423697449e-04 true resid norm 9.339595309685e-06 ||Ae||/||Ax|| 6.538090801174e-01<br>
 1 KSP preconditioned resid norm 4.903423697449e-04 true resid norm 9.339595309685e-06 ||Ae||/||Ax|| 6.538090801174e-01<br>
<br>
It look that function KSPMonitorTrueResidualNorm is evaluated twice, whereas for default KSP monitor only once. I use petsc-3.0.0-p7.<br>
<br>
Kind regards,<br>
Lukasz<br>
<br>
<br>
<br>
-- <br>
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</blockquote></blockquote>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
Lukasz Kaczmarczyk<br>
Lecturer<br>
Department of Civil Engineering,<br>
University of Glasgow,<br>
GLASGOW, G12 8LT<br>
Tel: +44 141 3305348<br>
email: <a href="mailto:likask@civil.gla.ac.uk" target="_blank">likask@civil.gla.ac.uk</a><br>
web: <a href="http://www.civil.gla.ac.uk/%7Ekaczmarczyk/" target="_blank">http://www.civil.gla.ac.uk/~kaczmarczyk/</a><br>
web: <a href="http://code.google.com/p/yaffems/" target="_blank">http://code.google.com/p/yaffems/</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>