[petsc-dev] PetscOptionsBegin etc all use global variables
Matthew Knepley
knepley at gmail.com
Sat Nov 2 07:51:03 CDT 2013
On Fri, Nov 1, 2013 at 11:27 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Barry Smith <bsmith at mcs.anl.gov> writes:
>
> > hence are not thread safe. Is there any decent way to deal with this?
>
> Make those variables thread local? Or make the database an object
> instead of a collection of global variables, in which case it can be
> cloned for each thread to access (and manipulate).
>
We could. It seems like our usual policy for carrying state around is to
shove it in
a PetscObject. What was the rationale for these functions not taking an
object?
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/20131102/667d2fda/attachment.html>
More information about the petsc-dev
mailing list