← Back to team overview

yade-dev team mailing list archive

Re: Energy tracing vs. multithread?

 

Wouldn't it help registration if OpenMPAccumulator was inheriting from template type "T"?

B.

Bruno Chareyre a écrit :
Hi,

I've been looking into OpenMPAcumulator.
Questions :
- Can I register the attribute  OMPAc <> plasticDissipation?
- Assuming the answer is no : I need to register a storage variable Real plasticDissipation2 for initialisation, so that saving/loading will not reset plastic energy. The problem is it needs a plasticDissipation2=plasticDissipation _before_ saving. Where could I do that? - plasticDissipation2 should be registered but hidden for the user, who has to use getPlasticDissipation() instead. Is that possible?

Thanks for suggestions.

Bruno



What will happen if two threads increment the value at the same time?
Pretty much random things (garbage, not incremented, etc), depending on
atomicity of reads/writes. There is OpenMPAcuumulator template for this
purpose, used e.g. for unbalanced force callback.







_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp



--
_______________
Bruno Chareyre
Associate Professor
Grenoble INP
Lab. 3SR
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




References