[petsc-dev] When __FUNCT__ is wrong

Satish Balay balay at mcs.anl.gov
Sat Aug 28 19:57:35 CDT 2010


On Sat, 28 Aug 2010, Barry Smith wrote:

> 
> On Aug 28, 2010, at 6:25 PM, Satish Balay wrote:
> 
> > On Fri, 27 Aug 2010, Jed Brown wrote:
> > 
> >> On Fri, 27 Aug 2010 12:45:46 -0500, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >>> 
> >>>  Jed,
> >>> 
> >>>      You are certainly welcome to add it.
> >> 
> >> fdbdc93647ff
> >> 
> >> This just writes inconsistencies via PetscErrorPrintf, only in debug
> >> mode.  I think I've gotten all the major inconsistencies in PETSc
> >> proper, Sieve might have more, but I don't have a current build of that.
> >> 
> >> Note that this might be noisy for user code that redefine __FUNCT__, but
> >> not everywhere.  If this bothers anyone, we could add a configure option
> >> to turn this, and only this, on and off.
> > 
> > If compiler supports the equivalent of __FUNCT__ - then configure
> > should set things in such a way that all macro automatically use that
> > one [and ignore __FUNCT__]

>  This may not work properly for our weird "templated" functions in
>     .h files for SOR for SBAIJ etc and for VecScatter. I'd like to
>     keep using out macro for now and only use the compiler version
>     for checking. Then in the releases we don't have Jed's check so
>     it doesn't bother people.


Looks like Jed's current change already does this. So its currently
broken?

The addition in my sugestion was to have a configure option to
enable-disable PetscCheck__FUNCT__()

Satish

> 
>    Barry
> > 
> > The error check option [for __FUNCT__ being correct] should just be a
> > special case test for us - or users - so an explicit configure can be
> > used for it.
> > 
> > Satish
> 
> 




More information about the petsc-dev mailing list