[petsc-users] How to get Version

jarunan at ascomp.ch jarunan at ascomp.ch
Thu Jul 15 10:36:44 CDT 2010


Thanks a lot

Jarunan


Quoting Satish Balay <balay at mcs.anl.gov>:

> 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
>>
>
>



-- 
Jarunan Panyasantisuk
Development Engineer
ASCOMP GmbH, Technoparkstr. 1
CH-8005 Zurich, Switzerland
Phone : +41 44 445 4072
Fax   : +41 44 445 4075
E-mail: jarunan at ascomp.ch
www.ascomp.ch
--

Profiles:
http://www.hydrocarbons-technology.com/contractors/instrumentation/ascomp/

Top News:
http://www.energy.gov/news/9011.htm
(ASCOMP is an associate member of the Consortium)

Training:
http://ascomp.ch/training.html


More information about the petsc-users mailing list