[petsc-users] How to get Version

Satish Balay balay at mcs.anl.gov
Thu Jul 15 10:02:04 CDT 2010


For eg:

#if (PETSC_VERSION_RELEASE == 1)
      write(6,25) PETSC_VERSION_MAJOR,PETSC_VERSION_MINOR,PETSC_VERSION_SUBMINOR,PETSC_VERSION_PATCH       
 25   format('PETSc Release Version: ',i1,'.',i1,'.',i1,' Patch:',i2)
#else
      write(6,25)
 25   format('PETSc Development Version: ',                             &                                  
     &     PETSC_VERSION_HG)

#endif

Satish


On Thu, 15 Jul 2010, Jed Brown wrote:

> 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