[petsc-dev] Why --with-dynamic-loading?

Matthew Knepley knepley at gmail.com
Thu Aug 29 09:23:35 CDT 2013


On Thu, Aug 29, 2013 at 9:07 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Lisandro asks why dynamic loading needs a different initialization
> procedure
>
> #if !defined(PETSC_USE_DYNAMIC_LIBRARIES)
>   ierr = KSPInitializePackage();CHKERRQ(ierr);
> #endif
>
> Meanwhile, we use normal shared libraries (--with-dynamic-loading=0)
> with plugins (petsc4py dynamically loads PETSc and the petsc-eig plugin
> is loaded by PETSc and calls back into SLEPc and PETSc).
>
> What is the use case that --with-dynamic-loading is intended to support?
>
> Can we support that use case without having the configuration option?
>

We wanted to initialize a given library before anything in it was used.
Dynamic libraries give us
a hook when we load them, but we do not have that statically. I could not
think of another way to
do it.

   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/20130829/bc3bfdb8/attachment.html>


More information about the petsc-dev mailing list