[petsc-dev] setting viewer format from options
Hapla Vaclav
vaclav.hapla at erdw.ethz.ch
Wed Jan 16 08:16:23 CST 2019
> 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.
Vaclav
>
> Lawrence
More information about the petsc-dev
mailing list