Barry Smith <[email protected]> writes: > Whose thread local? OpenMP threads, pthreads, can this be done so > it is all independent of the thread model that user is using. For > example in this case the user is using OpenMP but PETSc doesn’t > even know about threads, which except for a bunch of damn globals > would be ok.
PetscStack is already thread local. I would be in favor of putting all the global variables into a single object, making all the internal functions take that argument explicitly, and making the top-level user interface grab the thread-local object before passing it to the internal functions. Yes, we would have to know whether they liked pthreads, __thread, or OpenMP to declare the thread-local variable.
pgp9fwQ8Rsrjz.pgp
Description: PGP signature
