New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VectorPostprocessor threads design #7809
Comments
Not sure that there is a general design that can cover all possibilities On Tue, Oct 4, 2016 at 4:35 PM Cody Permann notifications@github.com
|
Yeah, the problem is that this logic error came out of implementing a Since |
After this is merged we can go through the existing samplers and remove temporary vectors or other workarounds to not having TLS. refs idaholab#7809
After this is merged we can go through the existing samplers and remove temporary vectors or other workarounds to not having TLS. refs idaholab#7809
After this is merged we can go through the existing samplers and remove temporary vectors or other workarounds to not having TLS. refs idaholab#7809
After this is merged we can go through the existing samplers and remove temporary vectors or other workarounds to not having TLS. refs idaholab#7809
This issue was closed with the thread local storage area being set up so that threads may concurrently write to a vector without issue (#7819). |
I'm hoping to create a discussion on this ticket rather than claiming there's a design issue somewhere. @dschwen just created a VectorPostprocessor where he was getting exponential growth on his vectors based on the number of threads he was using. After a little digging we discovered that the problem was that VectorPostprocessor references come from the MOOSE data store and we only have one copy among all threads. This seems problematic...
I bring this up because vector postprocessors are supposed to be a utility created by developers and we've even defined the same interface as the Postprocessor class with
threadJoin
andfinalize
methods. The current design definitely lends itself to a design trap when implementing a new threaded (Element or Nodal) vector postprocessor. I think most developers would assume that accessing and writing to the vector would be just fine in the execute method when it is in fact we can't expect good behavior from that operation.I think we should chat about ways to avoid this, ways to redesign the current vector data store, or ways to train users that this is unsafe behavior. Ideas are welcome.
tagging @idaholab/moose-team
The text was updated successfully, but these errors were encountered: