[petsc-dev] circular dependencies SLEPc

Balay, Satish balay at mcs.anl.gov
Wed Jun 26 09:56:49 CDT 2019


On Wed, 26 Jun 2019, Jakub Kruzik via petsc-dev wrote:

> Hello,
> 
> as I mentioned in PR #1819, I would like to use SLEPc in PETSc.
> 
> Currently when PETSc is configured with --download-slepc, it defines
> PETSC_HAVE_SLEPC and each compilation of PETSc recompiles SLEPc.

yes - slepc uses petsc, so when petsc is updated - its best to rebuild slepc

You can ignore PETSC_HAVE_SLEPC flag [its just a build tool thingy]
PETSc code does not use this flag - and there is no circular
dependency.

> The first way to use SLEPc is from an example. That should be easy, all we
> need is to add -lslepc when compiling an example.

Its best to use slepc examples as templates - and slepc makefiles [as examples].

--download-slepc is a convinence feature to install petsc and slepc in
a single go. It does not change how you would use slepc.

Satish


> 
> The other option is to use SLEPc inside PETSc code. I do not know how to
> achieve this. One way could be to define PETSC_HAVE_SLEPC after the
> compilation of SLEPc and again compile PETSc but this time linking with SLEPc.
> Although, even if it works, it is ugly.
> 
> Any ideas on how to achieve the second option?
> 
> Cheers,
> 
> Jakub
> 
> 



More information about the petsc-dev mailing list