On Nov 23, 2007 10:25 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> I would to propose some changes to error checking macros for optimized builds.
>
> 1.- SETERRQXXX: define them as
>
> #define SETERRQ[1|2|..](ierr,...)   return ierr

I think this is fine. However for it to matter, you need 2.

> 2.- CHKERRQ: define them as
>
> #define CHKERRQ(ierr)  if (ierr) return ierr
>
> For (1), it should be no performace impact. For (2), the extra check
> at almost every line of PETSc source code could impact performace, but
> any of you have a clear idea of how much?

This is a big problem because it completely blows the pipeline and disrupts
speculative execution (unless you always guess correctly). We could try
testing it, but someone will always complain. Optimized is supposed to be
as fast as possible, and this will be slower.

   Matt

> --
> Lisandro Dalc?n
> ---------------
> Centro Internacional de M?todos Computacionales en Ingenier?a (CIMEC)
> Instituto de Desarrollo Tecnol?gico para la Industria Qu?mica (INTEC)
> Consejo Nacional de Investigaciones Cient?ficas y T?cnicas (CONICET)
> PTLC - G?emes 3450, (3000) Santa Fe, Argentina
> Tel/Fax: +54-(0)342-451.1594
>
>



-- 
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


Reply via email to