Do you mean steps (iterations) 0 and 1 for SNES or KSP? If the iterations are for SNES probably you have problems with you nonlinear solver for which Octave can find a solution to the linear system but the actual problem is not in there. Do you use -snes_converged_reason? Are you sure that Matrix and right hand side routines are working well?<div>
<br></div><div>Michel</div><div><br><br><div class="gmail_quote">On Mon, Jul 27, 2009 at 4:30 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Jul 27, 2009, at 4:35 AM, Tim Kroeger wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear all,<br>
<br>
In my application, there is a linear system to be solved in every time step. Steps 0 and 1 work well, but in step 2 PETSc fails to converge. I suspected that the system might be unsolvable in that step and checked that by writing matrix and the right hand side to files and loading them into "octave". Surprisingly, "octave" does find a solution to the system without any problems.<br>
</blockquote>
<br></div>
Octave is using a direct solver. Did you try PETSc's direct solver using -pc_type lu?<br><font color="#888888">
<br>
Barry</font><div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The problem occurs even on a single core. I am using PETSc version 2.3.3-p11 with the GMRES solver and ILU preconditioner.<br>
<br>
Can anybody give me a hint which settings would PETSc reliably enable solving systems of the type that I face?<br>
<br>
I have put matrix and right hand side on my homepage; they can be downloaded from <a href="http://www.mevis.de/~tim/m-and-v.tar.gz" target="_blank">www.mevis.de/~tim/m-and-v.tar.gz</a> (7MB). In octave, I used the following commands to find and check the solution:<br>
<br>
octave:1> matrix2<br>
octave:2> vector2<br>
octave:3> x=Mat_0\Vec_1;<br>
octave:4> res=Mat_0*x-Vec_1;<br>
octave:5> norm(res)<br>
ans = 1.0032e-12<br>
octave:6> norm(Vec_1)<br>
ans = 27.976<br>
octave:7> norm(Mat_0,"fro")<br>
ans = 2.5917e+22<br>
octave:8> norm(x)<br>
ans = 3855.3<br>
<br>
<br>
Best Regards,<br>
<br>
Tim<br>
<br>
-- <br>
Dr. Tim Kroeger<br>
<a href="mailto:tim.kroeger@mevis.fraunhofer.de" target="_blank">tim.kroeger@mevis.fraunhofer.de</a> Phone +49-421-218-7710<br>
<a href="mailto:tim.kroeger@cevis.uni-bremen.de" target="_blank">tim.kroeger@cevis.uni-bremen.de</a> Fax +49-421-218-4236<br>
<br>
Fraunhofer MEVIS, Institute for Medical Image Computing<br>
Universitaetsallee 29, 28359 Bremen, Germany<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>