petsc-3.12.4 2020-02-04
Report Typos and Errors

# PetscGetVersionNumber

Gets the PETSc version information from the library

### Synopsis

    PetscErrorCode PetscGetVersionNumber(PetscInt *major, PetscInt *minor, PetscInt *subminor,PetscInt *release)

Not collective

### Output Parameter

| major | - the major version (optional, pass NULL if not requested)
| minor | - the minor version (optional, pass NULL if not requested)
| subminor | - the subminor version (patch number) (optional, pass NULL if not requested)
| release | - indicates the library is from a release, not random git repository (optional, pass NULL if not requested)

### Notes

The C macros PETSC_VERSION_MAJOR, PETSC_VERSION_MINOR, PETSC_VERSION_SUBMINOR, PETSC_VERSION_RELEASE provide the information at compile time. This can be used to confirm that the shared library being loaded at runtime has the appropriate version updates.

This function can be called before PetscInitialize()

### See Also

PetscGetProgramName(), PetscGetVersion(), PetscInitialize()

### Level

developer

### Location

src/sys/objects/version.c

### Examples

src/sys/examples/tutorials/ex17.c.html
src/sys/examples/tutorials/ex17f.F90.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages