:orphan:
# PETSC_VERSION
This manual page provides information about how PETSc documents and uses its version information. This information is available to both C/C++ and Fortran compilers when `petscsys.h` is included. The current PETSc version and the API for accessing it are defined in <A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscversion.h.html">include/petscverson.html</A>

The complete version number is given as the triple  PETSC_VERSION_MAJOR.PETSC_VERSION_MINOR.PETSC_VERSION_SUBMINOR (in short hand x.y.z)

A change in the minor version number (y) indicates possible/likely changes in the PETSc API. Note this is different than with the semantic versioning convention
where only a change in the major version number (x) indicates a change in the API.

A subminor greater than zero indicates a patch release. Version x.y.z maintains source and binary compatibility with version x.y.w for all z and w

Use the macros PETSC_VERSION_EQ(x,y,z), PETSC_VERSION_LT(x,y,z), PETSC_VERSION_LE(x,y,z), PETSC_VERSION_GT(x,y,z),
PETSC_VERSION_GE(x,y,z) to determine if the current version is equal to, less than, less than or equal to, greater than or greater than or equal to a given
version number (x.y.z).

`PETSC_RELEASE_DATE` is the date the x.y version was released (i.e. the version before any patch releases)

`PETSC_VERSION_DATE` is the date the x.y.z version was released

`PETSC_VERSION_GIT` is the last git commit to the repository given in the form vx.y.z-wwwww

`PETSC_VERSION_DATE_GIT` is the date of the last git commit to the repository

`PETSC_VERSION_()` is deprecated and will eventually be removed.



## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscsys.h.html#PETSC_VERSION">include/petscsys.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscsys.h)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
