PetscGetVersionNumber#

Gets the PETSc version information from the library

Synopsis#

#include "petscsys.h"   
PetscErrorCode PetscGetVersionNumber(PetscInt *major, PetscInt *minor, PetscInt *subminor, PetscInt *release)

Not Collective

Output Parameters#

  • 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/tutorials/ex17f.F90
src/sys/tutorials/ex17.c


Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages