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

Matthew Knepley knepley at gmail.com
Thu Aug 29 09:36:46 CDT 2013


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

> Matthew Knepley <knepley at gmail.com> writes:
> > We wanted to initialize a given library before anything in it was
> > used.
>
> Why?
>
> > 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.
>
> I understand that dynamic libraries allow you to do so, but what does
> that buy you?
>

You do all the logging initialization.


>
> Also, given that the first line of KSPInitializePackage is:
>
>   if (KSPPackageInitialized) PetscFunctionReturn(0);
>
> and PetscDLLibraryRegister_petscksp has already called
> KSPInitializePackage, isn't the preprocessor guard redundant?
>

Yes, if you don't mind calling it. It might have been before we put in the
guard. This is old.

   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/149b1c43/attachment.html>


More information about the petsc-dev mailing list