<div dir="ltr"><div dir="ltr">On Wed, Jun 26, 2019 at 11:55 AM Jed Brown via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">"Smith, Barry F. via petsc-dev" <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>> writes:<br>
<br>
>> On Jun 26, 2019, at 9:56 AM, Balay, Satish via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>> wrote:<br>
>> <br>
>> On Wed, 26 Jun 2019, Jakub Kruzik via petsc-dev wrote:<br>
>> <br>
>>> Hello,<br>
>>> <br>
>>> as I mentioned in PR #1819, I would like to use SLEPc in PETSc.<br>
>>> <br>
>>> Currently when PETSc is configured with --download-slepc, it defines<br>
>>> PETSC_HAVE_SLEPC and each compilation of PETSc recompiles SLEPc.<br>
>> <br>
>> yes - slepc uses petsc, so when petsc is updated - its best to rebuild slepc<br>
>> <br>
>> You can ignore PETSC_HAVE_SLEPC flag [its just a build tool thingy]<br>
>> PETSc code does not use this flag - and there is no circular<br>
>> dependency.<br>
>> <br>
>>> The first way to use SLEPc is from an example. That should be easy, all we<br>
>>> need is to add -lslepc when compiling an example.<br>
>> <br>
>> Its best to use slepc examples as templates - and slepc makefiles [as examples].<br>
>> <br>
>> --download-slepc is a convinence feature to install petsc and slepc in<br>
>> a single go. It does not change how you would use slepc.<br>
>> <br>
>> Satish<br>
>> <br>
>> <br>
>>> <br>
>>> The other option is to use SLEPc inside PETSc code. I do not know how to<br>
>>> achieve this. One way could be to define PETSC_HAVE_SLEPC after the<br>
>>> compilation of SLEPc and again compile PETSc but this time linking with SLEPc.<br>
>>> Although, even if it works, it is ugly.<br>
><br>
>    If you make SLEPc calls from PETSc source you should only need the SLEPc header files to compile the PETSc source; not the SLEPc library. So one way to accomplish this would be to do a "partial" install of SLEPc, build PETSc (that uses SLEPc) and then complete the SLEPc install. When --download-slepc is used this would mean during the SLEPc.py script it would copy over the SLEPc include files to the prefix location and after PETSc is built it would build the SLEPc libraries and move them to the prefix location.  The on iffy thing is that SLEPc include files may depend on generated PETSc include files (which are not fully generated until configure is done). Thus instead of having SLEPc.py move the SLEPc include to the prefix location it would need to post-pone that until just at the end of configure (we have other packages to do this). So when you ready to try this out let us know and we can help with the infrastructure. (it will avoid 2 builds of either PETSc or SLEPc).<br>
<br>
That is disgusting.<br>
<br>
If code in libpetsc.so depends on libslepc.so, then you'd have a circular dependency.<br>
<br>
<br>
You can implement and register a PC in SLEPc (it would go in libslepc.so).<br>
</blockquote></div><br clear="all"><div>I think this is the bad workflow solution. What Barry suggested will work and be MUCH easier for a developer. Isn't</div><div>the point of our tools to make our lives easier, not to enforce rules that make them harder?</div><div><br></div><div>   Matt</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>