[petsc-dev] Undefined symbol in SLEPc dylib (Haskell bindings, OSX)

Matthew Knepley knepley at gmail.com
Thu Jun 9 06:06:39 CDT 2016


On Thu, Jun 9, 2016 at 12:01 PM, Marco Zocca <zocca.marco at gmail.com> wrote:

> All the KSPConv* symbols are defined (`nm -u ...` shows the blank string):
>
> $ nm ${PETSC_DIR}/${PETSC_ARCH}/lib/libpetsc.3.7.2.dylib | grep KSPConv
>
> 000000000110a652 T _KSPConvergedDefault
> 0000000001109703 T _KSPConvergedDefaultCreate
> 000000000110b934 T _KSPConvergedDefaultDestroy
> 0000000001109a96 T _KSPConvergedDefaultSetUIRNorm
> 000000000110a074 T _KSPConvergedDefaultSetUMIRNorm
> 000000000106533d T _KSPConvergedLSQR
> 0000000001743280 D _KSPConvergedReasons
>

Then that symbol should be resolved by this library. It looks like you have
a problem in your link line.

   Matt


> 000000000173d300 s _KSPConvergedReasons_Shifted
> 000000000110920d T _KSPConvergedSkip
> 0000000001224e94 t _SNES_TR_KSPConverged_Destroy
> 00000000012248f6 t _SNES_TR_KSPConverged_Private
>
>
>
> >>
> >> I encounter this bug when accessing the PETSc and SLEPc dynamic
> >> library under OSX:
> >>
> >> user specified .o/.so/.DLL could not be loaded
> >> (dlopen($SLEPC_DIR/arch-darwin-c-debug/lib/libslepc.dylib, 5): Symbol
> >> not found: _KSPConvergedReasons
> >>   Referenced from: $SLEPC_DIR/arch-darwin-c-debug/lib/libslepc.dylib
> >>   Expected in: flat namespace
> >>  in $SLEPC_DIR/arch-darwin-c-debug/lib/libslepc.dylib)
> >>
> >> Surely, enough, `nm -u` shows _KSPConvergedReasons as an undefined
> >> symbol (see below).
> >> I don't understand the reason of this behaviour since I first compile
> >> with all the relevant PETSc and SLEPc headers and link against both
> >> .dylibs.
> >>
> >> Thank you in advance for any pointers,
> >> Marco
> >>
> >> -------
> >> $ nm -u libslepc.3.7.1.dylib | grep KSP
> >
> >
> > What do you get for
> >
> >   nm -u libpetsc.3.7.1.dylib | grep KSPConv
> >
> >      Matt
> >
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160609/bdb491a1/attachment.html>


More information about the petsc-dev mailing list