Back to home page

EIC code displayed by LXR

 
 

    


Last indexation completed on 2025-02-22 11:03:15 UTC

Examples for event parallelism
This directory includes example applications to demonstrate the usage of different techniques for achieving event parallelism with Geant4.
- MPI is a native interface with MPI libraries. The directory contains a Geant4 UI library and a couple of parallelized examples. Using this interface, users applications can be parllelized with different MPI compliant libraries, such as LAM/MPI, MPICH2, OpenMPI, and so on.
- Example TBB is derived from original basic/B2 demonstrating how to interface a simple application with the Intel Threading Building Blocks library (TBB), and organise MT event-level parallelism as TBB tasks.

  Name Size Date (UTC) Last indexed Description
  Name Size Date (UTC) Last indexed Description
folder Parent directory - 2025-02-22 08:01:08  
folder MPI/ - 2025-02-22 08:01:08  
folder TBB/ - 2025-02-22 08:01:08

Geant4 extended examples - TBB
TBB directory shows how to integrate Intel Threading Building Block and Geant4 to achieve event-level parallelism.
TBB/B2b
Currently only a preliminary version of one example is provided: it replaces the Geant4 Version 10.0 event-loop parallelism based on pthreads with TBB task-based parallelism. It should not be considered a feature-complete example and it present some limitations (no merging of output, no correct clean-up of heap).
It will be substantially improved in the future. If you have interest in TBB please refer to Geant4 Multi-threading user-forum (reachable from Geant4 website) where updates on TBB will be communicated or contact example author at: adotti@slac.stanford.edu.

folder ThreadsafeScorers/ - 2025-02-22 08:01:08

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

CMakeLists.txt 537 bytes 2025-02-22 08:01:08 -  
History 1768 bytes 2025-02-22 08:01:08 -  
README 752 bytes 2025-02-22 08:01:08 -