[petsc-dev] PetscLogView with PETSC_VIEWER_ASCII_INDEX et al.

Jed Brown jed at jedbrown.org
Thu Jan 14 22:37:49 CST 2016


Barry Smith <bsmith at mcs.anl.gov> writes:

>> On Jan 14, 2016, at 1:54 PM, Jed Brown <jed at jedbrown.org> wrote:
>> 
>> It turns out that if someone puts
>> 
>>  PetscViewerSetFormat(PETSC_VIEWER_STDOUT_WORLD,PETSC_VIEWER_ASCII_INDEX);
>
>    We could get rid of this routine and instead make users use
>    PetscViewerPushFormat(). They can still forget to pop and end up
>    later with the wrong format but the Push and Pop model is much
>    better and less prone to this type of error. Should we remove this?

I prefer the push/pop model, but I think it's orthogonal.  I wouldn't
mind marking PetscViewerSetFormat as deprecated (indefinitely), but
would rather not remove it immediately.

>> in their code and forgets to reset the format before PetscFinalize, then
>> -log_summary will not print.  This was easy enough for me to figure out
>> with a debugger, but totally perplexing for the application.
>
>    If they used the non-deprecated version of -log_view then I believe it will always work correctly because usage with PetscOptionsGetViewer() always does a fresh push and then pop of the format.
>
>    So I think we just need to train people to use -log_view (and the simplest way to do that is to remove -log_summary) 

Why force people to use a new name?  PETSc developers (including you)
are still telling people to use -log_summary, so it seems premature to
delete it.

Why not make -log_summary behave reasonably?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160114/6772bfbb/attachment.sig>


More information about the petsc-dev mailing list