[petsc-users] PC_SUBPC_ERROR with -pc_factor_zeropivot

Matthew Overholt overholt at capesim.com
Mon Jul 9 10:04:55 CDT 2018


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.

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
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180709/a7b47ce4/attachment-0001.html>


More information about the petsc-users mailing list