Gate icon indicating copy to clipboard operation
Gate copied to clipboard

Roadmap for multi-threading in Gate

Open BishopWolf opened this issue 6 years ago • 0 comments

This is a long request by the community, but it is also very hard to implement. It was partially discussed in this issue. It was also discussed in the Gate Hackaton, Lyon July 3, 2019

Roadmap

  1. Gate must avoid the root scoring per event, or modify it so it became thread-safe a. It would be beneficial to remove Root at all while scoring.
  2. All static object must be evaluated: a. those that have no reason to be static must be converted to dynamic b. those that have a reason to be static must be rewritten to thread-safe mode
  3. All actors must inherit from Virtual actor a. Virtual actor must differentiate between thread merge and global save b. Each actor must implement both thread merge and global save c. Each actor must implement its own containers and generate locks for accessing them d. The containers must be fully dynamic and must contain everything they need to run separately, even the synchronized calls to common constant objects like geometries.
  4. The run manager should be changed to use the G4MTRunManager a. The Random Engine must be created before initialization, adding the seed after makes no effect on it.

To start, it must be created a Gate implementation with only one actor, then add actors one by one.

BishopWolf avatar Jul 15 '19 09:07 BishopWolf