<div dir="ltr">On Thu, Aug 29, 2013 at 9:07 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Lisandro asks why dynamic loading needs a different initialization procedure<br>
<br>
#if !defined(PETSC_USE_DYNAMIC_LIBRARIES)<br>
  ierr = KSPInitializePackage();CHKERRQ(ierr);<br>
#endif<br>
<br>
Meanwhile, we use normal shared libraries (--with-dynamic-loading=0)<br>
with plugins (petsc4py dynamically loads PETSc and the petsc-eig plugin<br>
is loaded by PETSc and calls back into SLEPc and PETSc).<br>
<br>
What is the use case that --with-dynamic-loading is intended to support?<br>
<br>
Can we support that use case without having the configuration option?<br>
</blockquote></div><br>We wanted to initialize a given library before anything in it was used. Dynamic libraries give us</div><div class="gmail_extra">a hook when we load them, but we do not have that statically. I could not think of another way to</div>
<div class="gmail_extra">do it.</div><div class="gmail_extra"><br></div><div class="gmail_extra">   Matt<br clear="all"><div><br></div>-- <br>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>