[petsc-users] PETSC_VERSION_LT not giving expected result

Jim Fonseca jefonseca at gmail.com
Sat Jun 15 00:53:19 CDT 2013


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/991c5516/attachment-0001.html>


More information about the petsc-users mailing list