[petsc-users] PC_SUBPC_ERROR with -pc_factor_zeropivot

Matthew Overholt overholt at capesim.com
Mon Jul 9 11:13:16 CDT 2018


Great idea, thanks again!

Matt...


On Mon, Jul 9, 2018 at 11:08 AM, Matthew Knepley <knepley at gmail.com> wrote:

> On Mon, Jul 9, 2018 at 11:05 AM Matthew Overholt <overholt at capesim.com>
> wrote:
>
>> The -sub_pc_factor_zeropivot <value> option works, but since this is for
>> a commercial code I don't want users to have to type that every time.
>>
>> Is there an equivalent call to
>> PCFactorSetZeroPivot()
>> for the block Jacobi method (like PCSubFactorSetZeroPivot())?  I can't
>> find it.
>>
>> Instead, does one need to call
>> PCBjacobiGetSubKSP()
>> and then loop over every block, calling
>> KSPGetPC()
>> PCFactorSetZeroPivot()
>> on each block?  That seems a little tedious, but if that is the correct
>> approach I'll do it
>>
>
> Yes, that is the API approach. As you can see, for composed solvers its
> not a great option. How about
> putting
>
>   http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/
> PetscOptionsSetValue.html
>
> in the code?
>
>   Thanks,
>
>     Matt
>
>
>> Thanks,
>> Matt Overholt
>>
>> On Mon, Jul 9, 2018 at 10:17 AM, Matthew Overholt <overholt at capesim.com>
>> wrote:
>>
>>> Thanks, Matt, that option works perfectly, and explains the -ksp_view
>>> output.
>>>
>>> Much appreciated!
>>>    Matt...
>>>
>>> On Fri, Jul 6, 2018 at 6:25 PM, Matthew Knepley <knepley at gmail.com>
>>> wrote:
>>>
>>>> Default Case (zeropivot is 2.22045E-14):
>>>>> mpiexec -n 1 ...
>>>>> ==> ksp fails due to pcReason = PC_FACTOR_NUMERIC_ZEROPIVOT
>>>>>
>>>>> Reduced pivot case, n = 1:
>>>>> mpiexec -n 1 ... -pc_factor_zeropivot 1E-15
>>>>> ==> runs successfully
>>>>>
>>>>> Reduced pivot case, n > 1:
>>>>> mpiexec -n 2 .. -pc_factor_zeropivot 1E-15
>>>>> ==>  ksp fails due to pcReason = PC_SUBPC_ERROR
>>>>>
>>>>
>>>> Okay, what is likely happening is that your preconditioner is actually
>>>> Block-Jacobi/LU
>>>> instead of parallel LU. Thus you would need
>>>>
>>>>   -sub_pc_factor_zeropivot 1e-15
>>>>
>>>>
>>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180709/f872d01e/attachment.html>


More information about the petsc-users mailing list