[petsc-dev] SLEPc symbols not found

Pierre Jolivet pierre.jolivet at enseeiht.fr
Wed Feb 5 14:41:16 CST 2020



> On 5 Feb 2020, at 9:19 PM, Jacob Faibussowitsch <jacob.fai at gmail.com> wrote:
> 
>> None of the packages with builtafterpetsc = 1 are explicitly linked by PETSc rules.
> I see. Is this documented somewhere?

I don’t think this is.
But again, the rationale (which I find rather logic and which may explain the lack of documentation) is that all packages with builtafterpetsc = 1 are just commodities.
They are built for you by PETSc, but then it’s your job to use them as you see fit, as PETSc won’t use them directly.

Since SLEPc is following PETSc logic in some sense when it comes to makefile rules, you may also simply put instead of what you have right now:
include ${PETSC_DIR}/${PETSC_ARCH}/lib/slepc/conf/slepc_variables
include ${PETSC_DIR}/${PETSC_ARCH}/lib/slepc/conf/slepc_rules
+ ${SLEPC_LIB} instead of ${PETSC_LIB}

Thanks,
Pierre

> Maybe this should be noted during the initial configure stage when SLEPc (and other similar packages) are downloaded. 
> 
> Best regards,
> 
> Jacob Faibussowitsch
> (Jacob Fai - booss - oh - vitch)
> Cell: (312) 694-3391
> 
>> On Feb 5, 2020, at 2:16 PM, Pierre Jolivet <pierre.jolivet at enseeiht.fr <mailto:pierre.jolivet at enseeiht.fr>> wrote:
>> 
>> Hello,
>> None of the packages with builtafterpetsc = 1 are explicitly linked by PETSc rules.
>> Thus, you need to add -lslepc after ${PETSC_LIB} in your makefile.
>> 
>> Thanks,
>> Pierre
>> 
>>> On 5 Feb 2020, at 9:06 PM, Jacob Faibussowitsch <jacob.fai at gmail.com <mailto:jacob.fai at gmail.com>> wrote:
>>> 
>>> Hello,
>>> 
>>> TL;DR: 
>>> Undefined symbols for architecture x86_64:
>>>   "_EPSCreate", referenced from:
>>>       _main in tightbinding.o
>>> ld: symbol(s) not found for architecture x86_64
>>> 
>>> I Installed SLEPc using PETSc with —download-slepc, then reconfigured and made. I also am (I think) correctly including the linking PETSc in the makefile, but still I get errors whenever I try to use any SLEPc functions. Included is my makefile, c program, and logs.
>>> 
>>> <makefile>
>>> <tightbinding.c>
>>> <configure.log>
>>> <make.log>
>>> 
>>> Best regards,
>>> 
>>> Jacob Faibussowitsch
>>> (Jacob Fai - booss - oh - vitch)
>>> Cell: (312) 694-3391
>>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200205/f34d7de3/attachment.html>


More information about the petsc-dev mailing list