Thread-safety and shared geometry data J. Apostolakis.

Slides:



Advertisements
Similar presentations
C Language.
Advertisements

Specialized Geant4 navigation for GATE Jan De Beenhouwer Steven Staelens.
Presenter- Dan Carey August 11 and 12, 2009.
VROOM: Virtual ROuters On the Move Jennifer Rexford Joint work with Yi Wang, Eric Keller, Brian Biskeborn, and Kobus van der Merwe
Introduction to Kernel
Encapsulation by Subprograms and Type Definitions
Problem Solving #3: JVM ICS Outline Review of Key Topics Review of Key Topics Problem 1 Problem 1 Problem 2 Problem 2 Problem 3 Problem 3 Problem.
Lecture 2 – MapReduce CPE 458 – Parallel Programming, Spring 2009 Except as otherwise noted, the content of this presentation is licensed under the Creative.
Copyright (c) 2005 IBM Corporation; made available under the EPL v1.0 Enhancements in Memory View December 21, 2005.
From C++ to C#. Web programming The course is on web programming using ASP.Net and C# The course is on web programming using ASP.Net and C# ASP.Net is.
Silent Dismissal Administrator Quick Start Guide.
Geometry 5 I.Hrivnacova¹, J.Apostolakis² ¹IPN, Orsay; ²CERN Cours Paris June 2007.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
A genda for Today What is memory management Source code to execution Address binding Logical and physical address spaces Dynamic loading, dynamic linking,
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
CSSE501 Object-Oriented Development. Chapter 12: Implications of Substitution  In this chapter we will investigate some of the implications of the principle.
GEant4 Parallelisation J. Apostolakis. Session Overview Part 1: Geant4 Multi-threading C++ 11 threads: opportunity for portability ? Open, revised and.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Maria Grazia Pia Detector Response Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
Recursion. What is recursion? Rules of recursion Mathematical induction The Fibonacci sequence Summary Outline.
File Storage Organization The majority of space on a device is reserved for the storage of files. When files are created and modified physical blocks are.
Geant4 MT: an update J. Apostolakis for Geant4-MT developers Xin Dong, Gene Cooperman (Northeastern Univ.) Makoto Asai, Daniel Brandt (SLAC) J. Apostolakis,
Chapter 10 Chapter 10: Managing the Distributed File System, Disk Quotas, and Software Installation.
© ABB Group November 12, 2015 | Slide 1 ICV Implementation in Region ERP- Status update March 2011 & Plan for Go-Live REMSC, 2011.
- DHRUVA TIRUMALA BUKKAPATNAM Geant4 Geometry on a GPU.
System calls for Process management
Chapter 4 – Threads (Pgs 153 – 174). Threads  A "Basic Unit of CPU Utilization"  A technique that assists in performing parallel computation by setting.
The GeoModel Toolkit for Detector Description Joe Boudreau Vakho Tsulaia University of Pittsburgh CHEP’04 Interlaken.
1 Chapter Overview Managing Object and Container Permissions Locating and Moving Active Directory Objects Delegating Control Troubleshooting Active Directory.
VMC workshop1 Ideas for G4 navigation interface using ROOT geometry A.Gheata ALICE offline week, 30 May 05.
A Thread-Parallel Geant4 with Shared Geometry Gene Cooperman and Xin Dong College of Computer and Information Science Northeastern University 360 Huntington.
The High Performance Simulation Project Status and short term plans 17 th April 2013 Federico Carminati.
Programmability Hiroshi Nakashima Thomas Sterling.
Outline  Developments/fixes in the last year  Introduced in release 9.6 and patches  Planned for release 10.0 and ongoing …  Currently under development.
1 Becoming More Effective with C++ … Day Two Stanley B. Lippman
Geant4-MT migration and UI issues K. Murakami (KEK/CRC) Sep/11/201217th Geant4 Collaboration meeting1.
Maria Grazia Pia Hands-on exercises Unit 2 Modelling the experimental set-up.
Elimination Method Day 2 Today’s Objective: I can solve a system using elimination.
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
General Introduction and prospect Makoto Asai (SLAC PPA/SCA)
Parallel Computing Presented by Justin Reschke
Outline  Developments/fixes in the last year  Introduced in release 10.1 and patches (also to 10.0)  Planned for release 10.2 and ongoing …  Currently.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
New features in ROOT geometrical modeller for representing non-ideal geometries René Brun, Federico Carminati, Andrei Gheata, Mihaela Gheata CHEP’06,
Physics tables and multi-core J. Apostolakis. Motivation Limited reuse of memory in Multi-Processing – A forked process shares all pages of memory which.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
Processes Chapter 3. Processes in Distributed Systems Processes and threads –Introduction to threads –Distinction between threads and processes Threads.
Multi-threading and other parallelism options J. Apostolakis Summary of parallel session. Original title was “Technical aspects of proposed multi-threading.
Introduction to Kernel
J. Apostolakis, M. Asai, G. Cosmo, A. Howard
FIEGE INNOVATION CHALLENGE
Chapter 5: Threads Overview Multithreading Models Threading Issues
Markus Frank CERN/LHCb CHEP2013, Amsterdam, October 14th–18th 2013
HEP detector description supporting the full experiment life cycle
Want to play a game? – Linux Kernel Modules
Ideas for G4 navigation interface using ROOT geometry
Economics, Administration & Information system
Field propagation in Geant4
Read-out and detector response
A shortcut to the tracking
Field propagation in Geant4
Read-out and detector response
Quiz Name Here Click to start.
Field propagation in Geant4
Reference Counted Touchables Design
Field propagation in Geant4
Detector description News
design OO words Debug Variables Data types
Status of shower parameterisation
Presentation transcript:

Thread-safety and shared geometry data J. Apostolakis

Overview Issues – RW data in the ‘live’ geometry tree – Causes – Implications Improving Geometry for MT !? – Reducing / eliminating RW data – Impact on kernel and user code – Expected and potential changes

Issues Live geometry tree has ‘read write’ members – Physical Volumes – identify the copy number PVReplica: int CopyId PVParameterisedVolume: VSolid, Transformation,.. – This means that today the RW fields must be thread local in G4-MT – Can we make G4Navigator + Geometry ‘independent’ and fully thread-safe ?

What is RW in geometry? In the LIVE geometry tree most Physical Volumes types are RW (except Placement) – Why? To address need to identify the copy number, and to have the correct properties Specifically – PVReplica: int CopyId – PVParameterisedVolume: VSolid, Transformation, Material,..

Explanation Logical B Param or Replica PV Logical View – Replica or Parameterised Volume Physical B Logical Copy# Mate- rial View in Memory – Geant4 objects

Who uses the RW information? Every client of the geometry – G4VPhysicalVolume GetLogicalVolume() – G4LogicalVolume GetSolid() – G4LogicalVolume GetMaterial() G4Processes – Any process that needs User code – in Sensitive Detector, Actions, …

Implications This means that today all the RW fields must be thread local in G4-MT – A mini-class is required to hold CopyId for Replica – Each Replica instance gets an InstanceId, and references a location in Local Array Extra indirection + needs to use thread Id (worker?) Parameterised volumes have special way – A copy of each PV instance is created in master – Threads create a copy of each instance – Result: less memory savings; Unclear whether RegularNavigation will work.

Impact Each solid must have a Clone() method – A worker (thread) must create a clone of each solid of the Parameterised Volume Can be thousands or millions This solution greatly reduces reuse of memory in MT – Clear impact on applications with large Param. Vol. Unclear whether NestedParameterisation and Regular Navigation work or not Alternative solution could / should be sought

Tentative Plans Goal: Reduce or eliminate RW information in ‘live’ geometry tree – Keep all information about current volume only in G4TouchableHistory Can it be done without breaking interfaces? Challenge: What about existing uses of key methods? – in PhysicalVolume->GetLogicalVolume – logicaVolume->Get(Solid,Material,..)

Change: internal in Geometry Keep all information about current volume only in G4TouchableHistory Requires changes in G4Navigator and its dependent classes Additional information to be kept in Touchable History (tbc) – If we need to maintain interface(s) of PV, LV, Change interface of Parameterised Volume and Parameterisation ? Create a clone of logical volume (?)

Changes: users’ considerations If we do not keep compatibility all calls to GetLogicalVolume->Get(Solid, …) – Must migrate much kernel and user code – Some of this code is already wrong (must use TouchHist to get correct answer). How to solve uses of Physical/Logical Volume Get methods ? – Can ‘local’ clones of LogicalVolume solve this ?

Use in Tracking – after relocation Logical B Param or Replica PV Logical View – Replica or Parameterised Volume Physical B Logical Copy:5 Mate- rial View in Memory – Geant4 objects

Additional issues Must associate correct Thread-local Field to the relevant LogicalVolume (or Region). The locations of these fields are: – Global (all space) – belongs to World log-vol; – Per Region – belong to region; – Per Logical Volume – to LV. Must ensure correct assignments – Note that LV has a FieldManager = field + ‘Solver’