[petsc-users] Zeroed solution after 0 iterations

Barry Smith bsmith at mcs.anl.gov
Wed Apr 13 08:25:23 CDT 2016


   John,

    We'll need the full code to debug this. It doesn't see this should happen.

   Barry

> On Apr 13, 2016, at 7:11 AM, John Mousel <john.mousel at gmail.com> wrote:
> 
> 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.
> 
> John
> 
> solution before kspsolve:Vec Object: 1 MPI processes
>   type: mpi
> Process [0]
> 300
> 300
> 300
> 300
> 300
> KSP Object: 1 MPI processes
>   type: bcgs
>   maximum iterations=100
>   tolerances:  relative=1e-15, absolute=1e-50, divergence=10000
>   right preconditioning
>   using nonzero initial guess
>   using UNPRECONDITIONED norm type for convergence test
> PC Object: 1 MPI processes
>   type: ilu
>     ILU: out-of-place factorization
>     0 levels of fill
>     tolerance for zero pivot 2.22045e-14
>     matrix ordering: natural
>     factor fill ratio given 1, needed 1
>       Factored matrix follows:
>         Mat Object:         1 MPI processes
>           type: seqaij
>           rows=5, cols=5
>           package used to perform factorization: petsc
>           total: nonzeros=25, allocated nonzeros=25
>           total number of mallocs used during MatSetValues calls =0
>             using I-node routines: found 1 nodes, limit used is 5
>   linear system matrix = precond matrix:
>   Mat Object:   1 MPI processes
>     type: seqaij
>     rows=5, cols=5
>     total: nonzeros=25, allocated nonzeros=25
>     total number of mallocs used during MatSetValues calls =0
>       using I-node routines: found 1 nodes, limit used is 5
> solution after kspsolve:Vec Object: 1 MPI processes
>   type: mpi
> Process [0]
> 0
> 0
> 0
> 0
> 0 



More information about the petsc-users mailing list