[petsc-dev] now that we have -lpetsc should we also have #include "petsc.h"?
Barry Smith
bsmith at mcs.anl.gov
Fri Feb 26 14:38:09 CST 2010
Since I have heard no complaints and I have itchy fingers I have
pushed this change. Yes it affects almost all files but it is a tiny
change to each file and can easily be reverted if real trouble.
Barry
On Feb 25, 2010, at 4:27 PM, Barry Smith wrote:
>
> We can install PETSc with the option --with-single-library so that
> one links against -lpetsc instead of -lpetscts -lpetscsnes ... -
> lpetscsys
>
> This suggests that with include files we should have a parallel
> construct where one can do #include "petsc.h" to access all of
> PETSc's functionality (while, of course, continuing to be able to
> include just some some includes if you like).
>
> I propose the following, change petsc.h to petsccore.h and
> introduce a new petsc.h that is basically petscts.h
>
> What does everyone think?
>
> Notes:
> * Current C compiles won't break if users do not update there code
> (just everything will be included if they happen to have a #include
> "petsc.h")
> * Most users likely have include "petscksp.h" or "petscsnes.h"
> already in their code won't even have to change things to match the
> new "paradigm", the need only remove the "petsc.h" that they have
> now before other includes (which they never needed).
>
> * Fortran is a bit trickier so things might break for some users
> * Implementing this change means I go though the source code
> replacing "petsc.h" everywhere with "petsccore.h" no big deal.
>
> I really like this idea, in fact I like it so much I just want to
> do it this moment and push and be done with it, BUT I'll listen to
> your screams first in case I am missing something.
>
> Barry
>
More information about the petsc-dev
mailing list