[petsc-users] Reusing ML preconditioner

John Fettig john.fettig at gmail.com
Thu Jun 30 16:20:17 CDT 2011


On Thu, Jun 30, 2011 at 5:11 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> 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.

I mean that it doesn't make any difference, as you expect.

>   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.

I will see what I can do.

John


More information about the petsc-users mailing list