[petsc-users] Reusing ML preconditioner

Barry Smith bsmith at mcs.anl.gov
Thu Jun 30 16:11:58 CDT 2011


On Jun 29, 2011, at 10:35 PM, John Fettig wrote:

> On Wed, Jun 29, 2011 at 11:21 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>  If you pass in SAME_PRECONDITIONER to the KSPSetOperators() it is simply impossible that it will rebuild the preconditioner. There must be another explanation as to what is going on. Are you calling anything else on the KSP?
> 
> You are right.  I was playing around with options and had set it to
> SAME_NONZERO_PATTERN for the first iteration at each timestep to make
> sure that would work (it does), and forgot to change it back.
> 
> When it is actually set to SAME_PRECONDITIONER and I duplicate Amat to
> Pmat and pass them to KSPSetOperators() before every KSPSolve, it
> definitely uses the same preconditioner (as reported by -info), but
> unfortunately it reverts back to the behavior I saw previously.  

   What do you mean? Reverts back to? After some iterations? Copying the matrix and passing it into KSPSetOperators() as the Pmat cannot make any difference. 

   Can you send us a code that reproduces the problem you think is happening (petsc-maint at mcs.anl.gov), I cannot get a consistent handle on the issue.

   Barry

> The
> number of iterations jumps on the second timestep.
> 
>>   Is this only happing with PCML and not with other preconditioners like PCILU?
> 
> I have only tried PCML.  Let me try PCILU and get back to you.
> 
> John



More information about the petsc-users mailing list