> On Jun 2, 2015, at 3:29 PM, Dmitry Karpeyev <[email protected]> wrote:
> 
> Currently -pc_type lu will not detect a zero pivot (it will happily produce 
> an Inf or a NaN) and the flag it checks whether to see whether 
> to do it is erroriffpe.   KSP_DIVERGED_NANORINF is too generic.  What if the 
> user wants to verify there is a zero pivot?


   -ksp_error_if_not_converged will cause an immediate stack trace when the 
zero pivot occurs (as would the user calling MatSetErrorIfFPE() on the matrix 
or the use of -mat_error_if_fpe if it existed).

   There is no way currently to get back programatically anything more specific 
than KSP_DIVERGED_NANORINF on a zero pivot, we can start adding more that has 
nothing to do with -mat_error_if_fpe

> 
> Also, irrespective of the use case, if we have a XXXSetYYY(), isn't our 
> policy to have a command-line way of doing it?

  No, only when it makes sense and doesn't duplicate other functionality. I 
don't see -mat_error_if_fpe in this case adding anything more helpful then the 
already existing -ksp_error_if_not_converged

  Convince me.

  Barry



> 
> On Tue, Jun 2, 2015 at 2:21 PM Barry Smith <[email protected]> wrote:
> 
> > On Jun 2, 2015, at 3:02 PM, Dmitry Karpeyev <[email protected]> wrote:
> >
> > Should we have a way to turn on/off MatErrorIfFPE() on the command line?
> 
>   Sure, one does it with -ksp_error_if_not_converged or 
> -snes_error_if_not_converged  It only adds to user confusion, but no user 
> benefit, to have a -mat_error_if_fpe thing.
> 
>   What user case do think there is for a -mat_error_if_fpe ?
> 
>   Barry
> 
> 
> 
> > It is now turned off by default to allow Inf/NaNs to propagate and 
> > currently the only way to toggle it is programmatic.
> 
> 
> >
> > Dmitry.
> 

Reply via email to