[petsc-users] Petsc Options

Cody Permann codypermann at gmail.com
Mon Nov 14 17:06:36 CST 2011


On Nov 14, 2011, at 2:20 PM, Matthew Knepley wrote:

> On Mon, Nov 14, 2011 at 9:16 PM, Cody Permann <codypermann at gmail.com> wrote:
> How about a function that would fill in a char *[] with the options used or a function that would return a boolean for a single option indicating whether it was used or not?  Basically we just need a public way to get at the data in PetscOptionTable::used.
> 
> I don't like the whole table of options used, and we definitely need PetscOptionsOptionUsed(). What about providing
> the number of options, and an array of all option names?

That will work fine.  Anything is better than what we have now ;)

> 
>    Matt
>  
> Thanks,
> Cody
> 
> On Nov 14, 2011, at 12:41 PM, Barry Smith wrote:
> 
> >
> >  Cody,
> >
> >    What would you like the API to look like?
> >
> >   Barry
> >
> >
> > On Nov 14, 2011, at 1:39 PM, Cody Permann wrote:
> >
> >> There doesn't appear to be an API in PETSc for getting back the command line options "used" or "unused" for a simulation.  Yes I am aware that the options unused can be printed but there doesn't appear to be a mechanism for returning them back through a function call.  I'd like to add an option to MOOSE that would work like PETSc's "-options_left" CLI argument, but in order to do so I need to combine the options recognized for both libraries to report the global unused list.  Right now both MOOSE and PETSc have full access to the raw ARGV vector and each library recognizes it's own options and ignores the rest.
> >>
> >> I could strip out the options from ARGV before passing it to PETSc in conjunction with "-options_left" but that doesn't give me quite as much flexibility as I'd like.  It looks like there are about two dozen or so PETSc related options functions in the API but none of them return unused options, or otherwise allow me to query whether any particular option was recognized or not.  Is this assumption correct?
> >>
> >> Thanks,
> >> Cody
> >
> 
> 
> 
> 
> -- 
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111114/efb182b8/attachment.htm>


More information about the petsc-users mailing list