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

Jed Brown jedbrown at mcs.anl.gov
Thu Aug 29 09:30:22 CDT 2013

Matthew Knepley <knepley at gmail.com> writes:
> 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.

I understand that dynamic libraries allow you to do so, but what does
that buy you?

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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130829/c9663f54/attachment.sig>

More information about the petsc-dev mailing list