[petsc-dev] do PETSC_VIEWER_{HDF5,BINARY}_ need to exist?

Hapla Vaclav vaclav.hapla at erdw.ethz.ch
Wed May 8 09:03:36 CDT 2019



On 8 May 2019, at 14:08, Patrick Sanan <patrick.sanan at gmail.com<mailto:patrick.sanan at gmail.com>> wrote:



Am Mi., 8. Mai 2019 um 14:03 Uhr schrieb Matthew Knepley via petsc-dev <petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>>:
On Wed, May 8, 2019 at 7:41 AM Hapla Vaclav via petsc-dev <petsc-dev at mcs.anl.gov<mailto:petsc-dev at mcs.anl.gov>> wrote:
Hello

I just encountered their manpages and it's a mess. I think in case of file I/O, a user should be deliberate about filename and other settings. Sometimes less is more and I think this is the case. Why anybody should use PETSC_VIEWER_BINARY_(comm) and then set the filename with environment variable? Better to use PetscObjectViewFromOptions for instance (PETSC_OPTIONS can be used if one wants to use env var).

(And BTW in case of HDF5, the option -viewer_hdf5_filename is not processed anywhere.)

Any objections about removing these?

I am fine with it. The new system is better.

Since these are user interface, we should deprecate them somehow. Will the normal deprecation work?
These are functions (albeit weirdly-named ones which don't return error codes), so one would assume that the usual function deprecation procedure would work, and then things like PETSC_VIEWER_BINARY_WORLD would also show up as deprecated.

... Which I think is correct. I meant also PETSC_VIEWER_BINARY_{SELF,WORLD}.

I would even suggest to keep just PETSC_VIEWER_STDOUT* stuff (used most often and with least additional settings needed), or nothing at all.

Users should be encouraged to use stuff controllable from the options database.
I think changing the PetscViewerType by rewriting the hard-wired PETSC_VIEWER_* call sounds legacy.
If one insists on setting up everything using API, still it is more flexible to just use PetscViewerSetType and/or PetscViewerSetFromOptions.

Thanks,
Vaclav


  Thanks,

    Matt

Vaclav


--
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/20190508/2702524c/attachment.html>


More information about the petsc-dev mailing list