ML symbols in petscksp.so

Barry Smith bsmith at mcs.anl.gov
Wed Oct 28 16:29:48 CDT 2009


   We do do this for Mac (libpetsc*.dylib) and I think it mostly  
works. But I am not aware of anyone doing this intentionally for PETSc  
on Linux (though I think it is a good idea if it can be done).

    Bartry

On Oct 28, 2009, at 4:27 PM, Matthew Knepley wrote:

> On Wed, Oct 28, 2009 at 4:14 PM, Jed Brown <jed at 59a2.org> wrote:
> Matthew Knepley wrote:
> > You always have to link the ML library if you configure for ML,  
> right?
>
> No, all the third party libs used to be put into the PETSc shared libs
> (but not the static libs).  The easiest way to do this is with
> -Wl,--whole-archive though I haven't looked at the build system to see
> if this is how it is actually being done.  All the others still behave
> this way, but ML is no longer included.
>
> Wenever did this, and satill don't. We use -rpath, so that you can  
> track back to
> the associated shared library, if it exists.
>
>   Matt
>
> So if you are using shared libs, you only need to link libpetsc*.so.
> This is recommended practice with shared libs, you only explicitly  
> link
> the interface libraries (those that your code actually calls into) and
> let the linker handle the dependencies.  Of course when using static
> libs, you need to explicitly link all the dependencies.
>
> Jed
>
>
>
>
> -- 
> 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




More information about the petsc-dev mailing list