<div dir="ltr">Barry,<div><br></div><div>I've attached a small example that replicates this behavior.</div><div><br></div><div>John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 13, 2016 at 9:25 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">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"><br>
John,<br>
<br>
We'll need the full code to debug this. It doesn't see this should happen.<br>
<span class="HOEnZb"><font color="#888888"><br>
Barry<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Apr 13, 2016, at 7:11 AM, John Mousel <<a href="mailto:john.mousel@gmail.com">john.mousel@gmail.com</a>> wrote:<br>
><br>
> I have a colleague who is trying to run some simple test cases. He noticed if he provides the solution vector as the exact solution with a non-zero guess tagged, that the solution vector is zeroed upon return after 0 iterations. The system is just a 5x5 matrix corresponding to a heat equation with Dirichlet BCs. I've copied the KSPView below. He's using petsc-3.6.3.<br>
><br>
> John<br>
><br>
> solution before kspsolve:Vec Object: 1 MPI processes<br>
> type: mpi<br>
> Process [0]<br>
> 300<br>
> 300<br>
> 300<br>
> 300<br>
> 300<br>
> KSP Object: 1 MPI processes<br>
> type: bcgs<br>
> maximum iterations=100<br>
> tolerances: relative=1e-15, absolute=1e-50, divergence=10000<br>
> right preconditioning<br>
> using nonzero initial guess<br>
> using UNPRECONDITIONED norm type for convergence test<br>
> PC Object: 1 MPI processes<br>
> type: ilu<br>
> ILU: out-of-place factorization<br>
> 0 levels of fill<br>
> tolerance for zero pivot 2.22045e-14<br>
> matrix ordering: natural<br>
> factor fill ratio given 1, needed 1<br>
> Factored matrix follows:<br>
> Mat Object: 1 MPI processes<br>
> type: seqaij<br>
> rows=5, cols=5<br>
> package used to perform factorization: petsc<br>
> total: nonzeros=25, allocated nonzeros=25<br>
> total number of mallocs used during MatSetValues calls =0<br>
> using I-node routines: found 1 nodes, limit used is 5<br>
> linear system matrix = precond matrix:<br>
> Mat Object: 1 MPI processes<br>
> type: seqaij<br>
> rows=5, cols=5<br>
> total: nonzeros=25, allocated nonzeros=25<br>
> total number of mallocs used during MatSetValues calls =0<br>
> using I-node routines: found 1 nodes, limit used is 5<br>
> solution after kspsolve:Vec Object: 1 MPI processes<br>
> type: mpi<br>
> Process [0]<br>
> 0<br>
> 0<br>
> 0<br>
> 0<br>
> 0<br>
<br>
</div></div></blockquote></div><br></div>