adding macro in petscversion.h

Lisandro Dalcin dalcinl at gmail.com
Mon Dec 1 09:56:50 CST 2008


On Mon, Dec 1, 2008 at 1:51 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> On Mon, 1 Dec 2008, Lisandro Dalcin wrote:
>
>> It it is not too late, I would like to add the following macro in petscversion.h
>>
>> #if !defined(PETSC_VERSION_)
>
> I think there should not be this #if test. [Its more appropriate for
> petsc4py to check for this flag and redefine for old petsc versions].

Of couse, sorry! I just copied & pasted from my current code.

>
> So - its ok by me - to push this new macro..
>

OK, I'll push this somewhat safer version:

#define PETSC_VERSION_(MAJOR,MINOR,SUBMINOR) \
  ((PETSC_VERSION_MAJOR == (MAJOR)) &&	     \
   (PETSC_VERSION_MINOR == (MINOR)) &&	     \
   (PETSC_VERSION_SUBMINOR == (SUBMINOR)) && \
   (PETSC_VERSION_RELEASE  == 1))





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




More information about the petsc-dev mailing list