[petsc-dev] de-global variablelizing PETSc

Jed Brown jedbrown at mcs.anl.gov
Sun Nov 10 08:31:51 CST 2013


Matthew Knepley <knepley at gmail.com> writes:
>>    2) We need a way for initializing all the packages in PetscInitialize()
>> instead of as needed. In master I see
>>
>
> I really do not like this since then we are creating circular dependencies,
> and people who would like to "use
> only a part" will be upset. What about having the user who wants completely
> threadsafe stuff call *Initialize(),
> and then have this cascade all the way down (I think it should anyway).

Why is it not enough to have a lock for initialization (or anything else
that needs to modify the remaining globals)?  Those functions are not
performance-sensitive, so the locking strategy need only be immune to
deadlock, not high-performance.
-------------- 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/20131110/c5759303/attachment.sig>


More information about the petsc-dev mailing list