1 / 8

Physics tables and multi-core

Physics tables and multi-core. J. Apostolakis. Motivation. Limited reuse of memory in Multi-Processing A forked process shares all pages of memory which read-only (called ‘Copy-on-write’=COW) With Geant4 less than 30% can be shared Leading reasons: Caching in physics tables

milek
Download Presentation

Physics tables and multi-core

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Physics tables and multi-core J. Apostolakis

  2. Motivation • Limited reuse of memory in Multi-Processing • A forked process shares all pages of memory which read-only (called ‘Copy-on-write’=COW) • With Geant4 less than 30% can be shared • Leading reasons: • Caching in physics tables • Replicas’ copy numbers. • With simple changes could increase reuse

  3. Inside a Physics Table Physics Vector (material 1) Physics Vector (material 2) Physics Vector (material 3) Physics Table

  4. Inside a Physics Vector Last bin Last value Last 2nd Deriv. Scalars Energy Vector Value Vector 2nd Derivative Vector Cache: Read/Write Read-only after filling (initialization) 3 doubles Typically 70-150 double values each Typically created in consecutive areas of the heap. The result is: By writing the 3 doubles (cache) a process creates copy of page(s) which containing ~ 300 doubles

  5. Multiprocessing and ‘timing’ • BeamOn is called • Initialization of geometry • Initialization of physics processes • First event is processed • Worker processes (or threads) are created • Fork waits until the physics tables are initialized!

  6. Requirement for multiprocessing • Use separate areas of memory • One for the scalars (which are rewritten) • A different one for the vectors • Fork waits until the tables are initialized & shared.

  7. Complications? Other large arrays used by physics processes • Static arrays in Brems, pair production, Goldsmith-SaundersonMSc • C-arrays in • Hadron Elastic (no caching) • CHIPS Elastic (?caching?)

  8. Outcome • Revision of design of physics vector • To separate areas of memory for scalars and vectors • Hisaya was present – he maintains phys. vector

More Related