← Back to team overview

dolfin team mailing list archive

Re: Function design / Future multicore support in DOLFIN

 



Joachim B Haga wrote:
"Martin Sandve Alnæs" <martinal@xxxxxxxxx> writes:

2008/11/2 Joachim B Haga <jobh@xxxxxxxxxxxx>:
On Saturday 01 November 2008 17:10:09 Martin Sandve Alnæs wrote:
2008/11/1 Garth N. Wells <gnw20@xxxxxxxxx>:
So if we remove

 mutable Cell* _cell
 mutable int _facet

from the private member data of Function, does this resolve the
biggest design issue for running multi-threaded?
Yes. Otherwise the threads will overwrite each others current cell all
the time.
If you can get away with making these variables static, thread-local
variables (storage class __thread) is simpler.

But static... That sounds very limiting.

Perhaps. In that case, I'd suggest just letting each thread have its own
instance of any mutable classes, if that's possible.


Isn't Martin's suggestion that the necessary data be passed to the eval function much simpler?

Garth

-j.

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev




Follow ups

References