[petsc-users] PETSC_VERSION_LT not giving expected result
Jed Brown
jedbrown at mcs.anl.gov
Sat Jun 15 13:51:01 CDT 2013
Yikes, that should be RELEASE==1. Looks like I totally botched this:
https://bitbucket.org/petsc/petsc/commits/03354681f90b4c94467f09fd38f90b774d661d87
Will fix when I have a keyboard.
But how can you have this macro with 3.2?
On Jun 15, 2013 7:54 AM, "Jim Fonseca" <jefonseca at gmail.com> wrote:
> Hi,
> In http://www.mcs.anl.gov/petsc/petsc-current/include/petscversion.h
> there is:
>
>
>
> #define PETSC_VERSION_LT(MAJOR,MINOR,SUBMINOR) \
> (PETSC_VERSION_RELEASE == 0 && \
> (PETSC_VERSION_MAJOR < (MAJOR) || \
> (PETSC_VERSION_MAJOR == (MAJOR) && \
> (PETSC_VERSION_MINOR < (MINOR) || \
> (PETSC_VERSION_MINOR == (MINOR) && \
> (PETSC_VERSION_SUBMINOR < (SUBMINOR)))))))
>
>
> Won't this always be false for release versions?
>
> We're trying to move from 3.2 and the following is evaluating to true. (I've put the new additions to petscversion.h into that file in our older builds).
>
> #if PETSC_VERSION_GE(3,3,0)
>
> //we should not get here, but we do
>
>
> when petscversion.h has
>
> #define PETSC_VERSION_RELEASE 1
> #define PETSC_VERSION_MAJOR 3
> #define PETSC_VERSION_MINOR 2
> #define PETSC_VERSION_SUBMINOR 0
> #define PETSC_VERSION_PATCH 6
>
> Thanks,
>
> Jim
>
>
> --
> Jim Fonseca, PhD
> Research Scientist
> Network for Computational Nanotechnology
> Purdue University
> 765-496-6495
> www.jimfonseca.com
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130615/0cdaeedd/attachment.html>
More information about the petsc-users
mailing list