[petsc-dev] We need to cleanup viewers
Barry Smith
bsmith at mcs.anl.gov
Thu Mar 27 17:13:31 CDT 2014
On Mar 27, 2014, at 5:03 PM, Jed Brown <jed at jedbrown.org> wrote:
> Barry Smith <bsmith at mcs.anl.gov> writes:
>> If a user calls XXX() and it doesn’t do what they expect, how do
>> they figure out what is wrong? It is called debugging and usually
>> it is because what they expect is not what it does.
>
> I have to say, my first instinct in such cases, especially when working
> with an unfamiliar code base, is that the line invoking the viewer is
> never reached
Trivia to check in the debugger.
> or that the output has been redirected somewhere.
Yup, sometimes hard to debug
> I do
> not understand why they do it, but the vast majority of large projects I
> have encountered involve perversely-contorted debugging.
Agreed. Before there was any numerical code in PETSc 2 I had figured out and had -start_in_debugger working in parallel. I also figured out how to do tracebacks before any numerical code. I don’t know what order I put it in the repository but I spent time working on how to debug early (because I knew I would need to debug).
>
> Sometimes we want XXView(X,V) to mean "Hey X, anything you feel like
> talking about?" and other times we mean "X, serialize yourself!”
Maybe this is related to the specific type of viewer and even format. Also it is related to either 1) serialize yourself so you can be totally recreated (true serialization) versus 2) serialize enough of yourself so I can visualize you. We usually do 2) currently and in that case it is reasonable sometimes to not view everything.
Barry
> When
> the latter is deeply nested and chooses to ignore the request, it causes
> confusion. Maybe it's not important enough to fix in the near term.
More information about the petsc-dev
mailing list