[petsc-dev] configure usability

Matthew Knepley knepley at gmail.com
Wed Sep 1 07:30:06 CDT 2010


On Wed, Sep 1, 2010 at 12:56 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Wed, Sep 1, 2010 at 12:55 PM, Jed Brown <jed at 59a2.org> wrote:
>
>> Two thoughts:
>>
>> 1. Systematic deprecation system:
>>
>>  --with-shared doesn't give any errors today, but the option goes
>>  unused (because it's now spelled --with-shared-libraries).  I'd like
>>  to see either (a) recognize the old spelling but warn of deprecation,
>>  or (b) error giving the new spelling.  This seems easy to do by
>>  updating help.addArgument.
>>
>
> Good idea. Will do it.
>

Okay, our options system is sufficiently broken, that this is not easy. I
wish we could
use Python options, but it does not seem customizable enough to fit our
dynamic outlook
and help system. Pyre would be nice, but it is being rewritten and has too
much cruft
right now.

The problem is that clArgs are processed before initial options are set.
This should be
disentangled, because they have to be processed again sometime since they
override
defaults.

We should completely rewrite the system to do tracking of input, multistage
selection,
help output in other formats, unused options, misspelling detection, etc. I
can't do it
right now.

   Matt


>
>> 2. It's common to misspell options, difflib is part of the standard
>> library
>>  (from 2.3)
>>
>>    http://docs.python.org/library/difflib.html#difflib.get_close_matches
>>
>>  and would enable a warning like
>>
>>  The option "--with-shard-libaries" was not used, maybe you meant
>> "--with-shared-libraries".
>>
>>  Configure is imperative (as opposed to declarative, or with all
>>  options identified and available very early) so I don't think it's
>>  feasible to provide comprehensive misspelled options help immediately,
>>  but at least the unused options could be listed at the end.  This
>>  ought to just be a matter of having argDB log accesses, then at the
>>  end, take all entries that were never accessed and compute Levenshtein
>>  distance to the options that were accessed used to give suggestions.
>>
>
> The first part, putting in access logging, has been on the list for a long
> time.
> We need to do it, but its a bit of programming.
>
>
>>  I'm not sure what to do if configure errors out early, it might be
>>  hitting an error _because_ of an unused option, but there may be lots
>>  of unused options at this stage (that are valid and really will be
>>  used later).
>
>
> This is not really soluble now I think.
>
>    Matt
>
>
>>
>> Jed
>>
>
>
>
> --
> 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
>



-- 
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-dev/attachments/20100901/05990265/attachment.html>


More information about the petsc-dev mailing list