[petsc-dev] SNESMonitorVI fix: maint or master?

Barry Smith bsmith at mcs.anl.gov
Wed Oct 7 17:57:44 CDT 2015


> On Oct 7, 2015, at 5:48 PM, Dmitry Karpeyev <karpeev at mcs.anl.gov> wrote:
> 
> Now that we allow NaNs bubble up through the solver, 
> this can trip mysterious-looking errors in SNESVI:
> PETSC_ERR_PLIB, "Can never get here" 
> is thrown from SNESMonitorVI(), because a NaN in 
> the residual can defeat all of the seemingly-exhaustive
> if-then-else branches counting the number of active constraints.

  Shouldn't the SNESSolver already returned as "failed" before it ever gets to SNESMonitorVI in this case? Since the vector was marked with some Nan's it means that something has gone wrong already and any data in there is meaningless crap? Why count meaningless crap?
> 
> I think the fix should be to count the number of NaNs separately
> and report them alongside the legitimate active bounds to give
> the user as much useful information as possible.  Since this entails
> a substantial difference to the output format of -snes_vi_monitor,
> should the fix go to maint or master?

  Not maint.

> 
> Dmitry.




More information about the petsc-dev mailing list