Actual source code: version.c

petsc-3.5.1 2014-08-06
Report Typos and Errors
  1: #include <petscsys.h>
  2: /*@C
  3:     PetscGetVersion - Gets the PETSc version information in a string.

  5:     Input Parameter:
  6: .   len - length of the string

  8:     Output Parameter:
  9: .   version - version string

 11:     Level: developer

 13:     Fortran Note:
 14:     This routine is not supported in Fortran.

 16:     Developer Note: The version information is also listed in
 17: $    src/docs/tex/manual/intro.tex,
 18: $    src/docs/tex/manual/manual.tex.
 19: $    src/docs/website/index.html.

 21: .seealso: PetscGetProgramName()

 23: @*/

 27: PetscErrorCode PetscGetVersion(char version[], size_t len)
 28: {
 30: #if (PETSC_VERSION_RELEASE == 1)
 31:   PetscSNPrintf(version,len,"Petsc Release Version %d.%d.%d, %s ",PETSC_VERSION_MAJOR,PETSC_VERSION_MINOR, PETSC_VERSION_SUBMINOR,PETSC_VERSION_DATE);
 32: #else
 33:   PetscSNPrintf(version,len,"Petsc Development GIT revision: %s  GIT Date: %s",PETSC_VERSION_GIT, PETSC_VERSION_DATE_GIT);
 34: #endif
 35:   return(0);
 36: }