[petsc-users] PETSc backward compatibility

Patrick Sanan patrick.sanan at gmail.com
Sat Mar 7 06:23:33 CST 2020


I agree that it's better to upgrade whenever possible, but if for reasons
out of your control you find yourself needing to support multiple versions
of PETSc,
which span API changes, you can use macros that PETSc provides for you, as
described here:
https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PETSC_VERSION.html

I found this handy in a similar situation to yours. There was one lingering
production cluster that had an old version of PETSc in a
very-convenient-for-users module, even though everywhere else we could use
the latest.

#if PETSC_VERSION_GE(3,9,0)
call PCFactorSetUpMatSolverType(pc,ierr);CHKERRQ(ierr);
#else
call PCFactorSetUpMatSolverPackage(pc,ierr);CHKERRQ(ierr); ! PETSc 3.8 and
earlier
#endif


Am Fr., 6. März 2020 um 19:15 Uhr schrieb Matthew Knepley <knepley at gmail.com
>:

> On Fri, Mar 6, 2020 at 12:16 PM baikadi pranay <pranayreddy865 at gmail.com>
> wrote:
>
>> Hello PETSc users,
>>
>> We have a FORTRAN code which uses eigenvalue solver routines. The version
>> of PETSc/SLEPc used is 3.11.1.We would be deploying the code on a cluster
>> which has PETSc/SLEPc version 3.6.4. We were wondering if we need to change
>> any functions or if there is backwards compatibility.
>>
>> Please let me know if you need any further information.
>>
>
> 3.6 is 5 years old. It would be easier to just install the new version on
> the cluster. That would take 20min max.
>
> However, if you would really like to make it compatible, you can look at
> the list of changes here:
> https://www.mcs.anl.gov/petsc/documentation/changes/index.html
>
>   Thanks,
>
>      Matt
>
>
>> Thank you,
>> Pranay.
>>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200307/d0eb5b8f/attachment.html>


More information about the petsc-users mailing list