[petsc-dev] petscversion.h unchanged but API changed for MatGetSubMatrix and others

Eric Chamberland Eric.Chamberland at giref.ulaval.ca
Fri Mar 10 13:42:43 CST 2017


thanks for these infos.

Isn't there a bug into the macros?

Let's say I retreived a copy of petsc-master 3.7.2 then I have:

#define PETSC_VERSION_MAJOR      3
#define PETSC_VERSION_MINOR      7

Now an API changed in officiel release 3.7.4 and over, in my in-house 
code, if I use:


for my "old" petsc-master 3.7.2, it first checks:


which is erroneously false.... no?


On 10/03/17 02:10 PM, Jed Brown wrote:
> Barry Smith <bsmith at mcs.anl.gov> writes:
>>    Eric,
>>       The model we have followed is that master retains the version number of the latest patched release and then at the time of a release the version number is increased.  For releases  PETSC_VERSION_RELEASE  is defined to be 1 while for master PETSC_VERSION_RELEASE  is defined to be 0. Thus if you want to switch between master and release you need to also include a check on the PETSC_VERSION_RELEASE value.
> PETSC_VERSION_LT and related comparison macros handle non-RELEASE as
> +Inf for the purpose of comparison.  I recommend using those macros.

More information about the petsc-dev mailing list