[petsc-users] How to get Version
Jed Brown
jed at 59A2.org
Thu Jul 15 08:50:08 CDT 2010
On Thu, 15 Jul 2010 12:07:40 +0200, jarunan at ascomp.ch wrote:
>
> Hello,
>
> I want to get version of Petsc but the command PetscGetVersion is not
> supported in Fortran. Is there another command I can use for Fortran?
#if (PETSC_VERSION_RELEASE == 1)
#define PetscGetVersion(version,len) PetscSNPrintf(version,len,"Petsc Release Version %d.%d.%d, Patch %d, %s ", \
PETSC_VERSION_MAJOR,PETSC_VERSION_MINOR, PETSC_VERSION_SUBMINOR, \
PETSC_VERSION_PATCH,PETSC_VERSION_PATCH_DATE)
#else
#define PetscGetVersion(version,len) PetscSNPrintf(version,len,"Petsc Development HG revision: %s HG Date: %s", \
PETSC_VERSION_HG, PETSC_VERSION_DATE_HG)
#endif
These are defined from Fortran as well so you can build a string of your liking.
Jed
More information about the petsc-users
mailing list