[petsc-dev] configure issues

Matthew Knepley knepley at gmail.com
Wed Feb 9 05:56:36 CST 2011


On Wed, Feb 9, 2011 at 5:49 AM, Jed Brown <jed at 59a2.org> wrote:

> On Wed, Feb 9, 2011 at 12:33, Matthew Knepley <knepley at gmail.com> wrote:
>
>> If you refer to the first part of your comment above, it suggested
>> generating the correct code,
>
>
> So every function in PETSc that currently does
>
> #if something
> ...
> #else
> ...
> #endif
>
> would be replaced by generated headers and source files that have only the
> chosen path. I think this will make it far more confusing to find out what
> paths are possible, to make edits safely, and to locate definitions. I do
> not know of any successful project that generates code for something like
> this.
>
> Barry was not suggesting any new use of the preprocessor, just renaming
> existing macros to make navigation easier. I think it's fine to keep the
> existing names and instead write a snippet of elisp to make navigation
> easier. Your response that all use of the preprocessor should be replaced by
> generated code (or something) does not address the problem at all, and, if
> anything, makes it worse because configure would become more complicated.
>
> For what it's worth, despite Python being "better" in all the ways you
> mention, I don't know anybody who finds it easier/safer/faster to edit
> BuildSystem code than to edit PETSc C source. This is less a statement about
> the language and more a statement about organization, but I would be very
> cautious about moving large amounts of complexity from src/*.c to
> config/*.py.
>

We used to have everything in the preprocessor, and we could happily edit
that and never have to think
about Python at all. We abandoned that approach because it was too
complicated, prone to break, and
we spent all of our petsc-maint time on it.

   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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110209/d6f9c63c/attachment.html>


More information about the petsc-dev mailing list