[petsc-dev] setting viewer format from options
Matthew Knepley
knepley at gmail.com
Wed Jan 16 08:20:51 CST 2019
On Wed, Jan 16, 2019 at 9:17 AM Hapla Vaclav <vaclav.hapla at erdw.ethz.ch>
wrote:
> > On 16 Jan 2019, at 14:42, Lawrence Mitchell <wence at gmx.li> wrote:
> >
> >
> >
> >> On 16 Jan 2019, at 13:21, Matthew Knepley via petsc-dev <
> petsc-dev at mcs.anl.gov> wrote:
> >>
> >> I think you just Push and do not Pop. Do we check for a non-empty
> stack? We silently ignore too many Pops.
> > If you don't pop, at least in the past, you would get an error.
>
> Concerning this specific Push, you only get an error after you reach a
> certain limit of Pushes without Pops.
>
> https://bitbucket.org/petsc/petsc/src/master/src/sys/classes/viewer/interface/viewa.c#lines-150
>
> The limit is set 25 in
>
> https://bitbucket.org/petsc/petsc/src/master/include/petsc/private/viewerimpl.h#lines-24
>
> So is it wise to do that as Matt wrote? It would basically make
> PetscViewerSetFromOptions() non-reentrant.
>
1) Its crazy to have a limit. We should make it reallocate and copy, like
everything else.
2) I agree that Pushing is just a bad stopgap. I think we should
un-deprecate Set if we are using it this way.
Thanks,
Matt
> Vaclav
>
> >
> > Lawrence
>
>
--
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.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190116/140454f1/attachment.html>
More information about the petsc-dev
mailing list