avoiding incorrect code

Satish Balay balay at mcs.anl.gov
Wed Jan 14 15:37:18 CST 2009


There are tonnes of places in PETSc with this usage [which I guess is
fixable].

But imposing coding guidelines [which are unenforceable] to hide
compiler differences is a bad policy.. It will continue to waste
time..

Satish

On Wed, 14 Jan 2009, Barry Smith wrote:

> 
>   From the PETSc developers guide
> 
> Do not use {\em if (rank == 0)} or {\em if (v == PETSC\_NULL)} or {\em if (flg
> == PETSC\_TRUE)} or {\em if (flg == PETSC\_FALSE)}
> instead use {\em if (!rank)} or {\em if (!v)} or {\em if (flg)} or {\em if
> (!flg)}.
> 
>  There was a flag == PETSC_TRUE in PETSc 3.0.0 that wasted a lot of several
> peoples time finding it. Come on folks, we have better things to do with our
> time. Please avoid this incorrect usage.
> 
>   Barry
> 




More information about the petsc-dev mailing list