You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduces multi-threaded creation of the material budget lookup table, reducing it
from hours to minutes. Creating the LUT walks every cell of every layer through TGeo
and the cells are independent, so they are spread over TBB tasks with one
TGeoNavigator per thread. The innermost 20 layers at 60 trials/cell drop from 28 min
to 72 s on 28 cores.
Effective only with ROOT >= v6-36-10-alice3, which removes a per-query thread-id
lookup and the false sharing between per-thread scratch buffers of TGeo shapes. On
older ROOT the parallel path is correct, just slower -- it saturates near 12x.
All layers map onto a single flat cell index so the load stays balanced despite very
different cell counts per layer; a binary search maps a flat index back to
(layer, iz, iphi). The worker navigators are given back at the end.
meanMaterialBudget() takes an optional navigator: a caller passing its own runs
lock-free, a caller passing none shares gGeoManager's and still takes the mutex.
Deciding from the argument keeps it local, so process-global state cannot break it.
Thread count comes from the new populateFromTGeo() argument, falling back to
NTHREADS_MATBUD; the default is the previous serial path. Results are independent of
the thread count -- compareMatBudLUT.C checks a parallel LUT against a serial one cell
by cell, and they match exactly over all 129523 cells.
Supervised-by: Sandro Wenzel <sandro.wenzel@cern.ch>
0 commit comments