[petsc-dev] RegisterAllCalled visibility

Matthew Knepley knepley at gmail.com
Fri Dec 12 13:18:21 CST 2014


On Fri, Dec 12, 2014 at 12:43 PM, Tobin Isaac <tisaac at ices.utexas.edu>
wrote:
>
>
> Hi all,
>
> I'm trying to learn about PETSc's dynamic library framework.  I've
> noticed that XXXInitializePackage() routines are idempotent, but
> XXXRegisterAll() routines are not, and usually have a visible
> XXXRegisterAllCalled boolean to guard against multiple calls (but not
> always).  Then there are comments that say "In general, if there is
> more than one DLL then XXXRegisterAll() may be called several times."
> I don't understand the different handling between initialization and
> registration, especially because the initialization routines generally
> call the registration routines.  Any help?
>

That is just crappy engineering on our part. The RegisterAllCalled() should
be idempotent
just like PackageInitialize(). Does anyone disagree with this?

  Thanks,

    Matt


> Thanks,
>   Toby
>


-- 
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/20141212/2e6b3e4e/attachment.html>


More information about the petsc-dev mailing list