[petsc-dev] Are there both a function AND a #define to retrieve PETSc version?

Eric Chamberland Eric.Chamberland at giref.ulaval.ca
Sat Aug 27 22:04:41 CDT 2016


Le 2016-08-27 à 15:07, Barry Smith a écrit :
>> On Aug 27, 2016, at 1:59 PM, Jed Brown <jed at jedbrown.org> wrote:
>> What about
>> #define PetscInitialize(argc,argv,file,help) PetscInitialize_Private(argc,argv,file,help,PETSC_VERSION_MAJOR,PETSC_VERSION_MINOR,PETSC_VERSION_SUBMINOR,PETSC_VERSION_RELEASE)
>> and PetscInitialize will check for ABI compatibility (error if not)?
>     Ok
that's sounds good.
>> Note that subminor version (Eric's example) does not affect the ABI so
>> it's fine to have a mismatch there
>     Well in Eric's case he knows he needs a bug fix in sub minor 3 and wants to generate an error if linked against an earlier one that does not have the bug fix. There needs to be a way for users to indicate if they need above something in the sub minor, doesn't there?
Exactly: and another thing: in our case, if we know we aren't compatible 
with 3.7.2 because of a specific bug, I am already able to prevent it at 
compile time, but not at run time if the user changes the dynamically 
linked libs...  So I still need some "public" function to check it...

I did just implemented the MPI runtime version check based on 
"MPI_Get_library_version"... but maybe you will want to do it right into 
petsc too... :)



More information about the petsc-dev mailing list