[petsc-dev] [petsc-users] Using PETSC with an openMP program

Matthew Knepley knepley at gmail.com
Fri Mar 2 23:00:55 CST 2018


On Fri, Mar 2, 2018 at 11:55 PM, Jed Brown <jed at jedbrown.org> wrote:

> Matthew Knepley <knepley at gmail.com> writes:
>
> > On Fri, Mar 2, 2018 at 6:17 PM, Scott Kruger <kruger at txcorp.com> wrote:
> >
> >> On 3/2/18 12:44 PM, Matthew Knepley wrote:
> >>
> >>> On Fri, Mar 2, 2018 at 2:39 PM, Jed Brown <jed at jedbrown.org <mailto:
> >>> jed at jedbrown.org>> wrote:
> >>>
> >>>     Matthew Knepley <knepley at gmail.com <mailto:knepley at gmail.com>>
> >>> writes:
> >>>
> >>>      > That is not the same as printing unused arguments. Michael's
> Pythia
> >>>      > does this correctly, but it is even less simple.
> >>>
> >>>     You want it to accept the unused arguments and just print them
> without
> >>>     error, or some more subtle relationship among dependent options?
> >>>
> >>>
> >>> Yes, I do. I consider PETSc to have the correct functionality. The open
> >>> world
> >>> assumption is a good one, as long as you report that no one accepted
> that
> >>> option.
> >>>
> >>
> >> https://docs.python.org/3/library/argparse.html#partial-parsing
> >>
> >> Requires Python > 2.7
> >
> >
> > Good catch!
>
> I'm not sure it's quite what Matt is after.  Argparse is in the standard
> library since 2.7, but is available for earlier versions of Python.
>
>   https://pypi.python.org/pypi/argparse
>
> > The other thing I remember argparse not doing last time I checked, was
> > that it could group options into sections like we want for our help.
>
> That has always been in argparse.  Maybe you're thinking of some earlier
> options parsing library.
>
> https://docs.python.org/3/library/argparse.html#sub-commands
> https://docs.python.org/3/library/argparse.html#argument-groups
>

I knew and used subcommands, but I had not seen argument groups.

  Matt

-- 
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.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20180303/2b98edb5/attachment-0001.html>


More information about the petsc-dev mailing list