![]() |
|
|||
Last indexation completed on 2025-02-22 11:03:15 UTC
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
Example ThreadsafeScorers
This example demonstrates a very simple application where an energy
deposit and # of steps is accounted in thread-local (i.e. one instance per
thread) hits maps with underlying types of plain-old data (POD) and global
(i.e. one instance) hits maps with underlying types of atomics.
The example uses a coarse mesh, extensive physics, and step limiters
to ensure that there is a higher degree of conflict between threads
when updating the scorers to test the robustness of the atomics
classes and maximize the compounding of thread-local round-off error.
At the end of the simulation, the scorers are printed to
"mfd_<DATA_TYPE>_<SCORER_TYPE>.out", where DATA_TYPE is either
"tl" (thread-local) or "tg" (thread-global) and SCORER_TYPE is "EnergyDeposit"
or "NumberOfSteps". These values are then compared to a thread-global
sum of these scorers that were updated via mutex locking. If round-off
errors in thread-local EnergyDeposit are present, they can be viewed
in "mfd_diff.out" at the end of the simulation
SEE ALSO: README
Name | Size | Date (UTC) | Last indexed | Description | |
---|---|---|---|---|---|
Name | Size | Date (UTC) | Last indexed | Description | |
![]() |
Parent directory | - | 2025-02-22 08:01:08 |
Examples for event parallelism
|
|
![]() |
include/ | - | 2025-02-22 08:01:08 | ||
![]() |
plots/ | - | 2025-02-22 08:01:08 | ||
![]() |
src/ | - | 2025-02-22 08:01:08 | ||
![]() |
CMakeLists.txt | 1332 bytes | 2025-02-22 08:01:08 | - | |
![]() |
GNUmakefile | 269 bytes | 2025-02-22 08:01:08 | 2025-02-22 09:43:40 | |
![]() |
History | 5407 bytes | 2025-02-22 08:01:08 | - | |
![]() |
README | 7914 bytes | 2025-02-22 08:01:08 | - | |
![]() |
restart.mac | 408 bytes | 2025-02-22 08:01:08 | - | |
![]() |
run.mac | 909 bytes | 2025-02-22 08:01:08 | - | |
![]() |
threadsafe-scorers.out | 105041 bytes | 2025-02-22 08:01:08 | - | |
![]() |
ts_scorers.cc | 4979 bytes | 2025-02-22 08:01:08 | 2025-02-22 09:43:40 | |
![]() |
ts_scorers.in | 336 bytes | 2025-02-22 08:01:08 | - | |
![]() |
vis.mac | 1918 bytes | 2025-02-22 08:01:08 | - |
[ Source navigation ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |