GeantV code sprint report Fermilab 3-8 October 2015 A. Gheata.

Slides:



Advertisements
Similar presentations
Use of G EANT 4 in CMS AIHENP’99 Crete, April 1999 Véronique Lefébure CERN EP/CMC.
Advertisements

Software Summary Database Data Flow G4MICE Status & Plans Detector Reconstruction 1M.Ellis - CM24 - 3rd June 2009.
D. Düllmann - IT/DB LCG - POOL Project1 POOL Release Plan for 2003 Dirk Düllmann LCG Application Area Meeting, 5 th March 2003.
1 Thursday, June 15, 2006 Confucius says: He who play in root, eventually kill tree.
Offline Programming to Online using IPS
REVIEW OF NA61 SOFTWRE UPGRADE PROPOSAL. Mandate The NA61 experiment is contemplating to rewrite its fortran software in modern technology and are requesting.
Mantychore Oct 2010 WP 7 Andrew Mackarel. Agenda 1. Scope of the WP 2. Mm distribution 3. The WP plan 4. Objectives 5. Deliverables 6. Deadlines 7. Partners.
U-Solids: new geometrical primitives library for Geant4 and ROOT Marek Gayer CERN Physics Department (PH) Group Software Development for Experiments (SFT)
Usability Issues Documentation J. Apostolakis for Geant4 16 January 2009.
SRM 2.2: status of the implementations and GSSD 6 th March 2007 Flavia Donno, Maarten Litmaath INFN and IT/GD, CERN.
Offline Coordinators  CMSSW_7_1_0 release: 17 June 2014  Usage:  Generation and Simulation samples for run 2 startup  Limited digitization and reconstruction.
Status of the vector transport prototype Andrei Gheata 12/12/12.
Progress with migration to SVN Part3: How to work with g4svn and geant4tags tools. Geant4.
Study for Migration from CVS to SubVersion (SVN) Gunter Folger CERN/PH/SFT.
Continuous Integration and Code Review: how IT can help Alex Lossent – IT/PES – Version Control Systems 29-Sep st Forum1.
Detector Simulation on Modern Processors Vectorization of Physics Models Philippe Canal, Soon Yung Jun (FNAL) John Apostolakis, Mihaly Novak, Sandro Wenzel.
ADAPTATIVE TRACK SCHEDULING TO OPTIMIZE CONCURRENCY AND VECTORIZATION IN GEANTV J Apostolakis, M Bandieramonte, G Bitzes, R Brun, P Canal, F Carminati,
Geant4 based simulation of radiotherapy in CUDA
Computing Performance Recommendations #13, #14. Recommendation #13 (1/3) We recommend providing a simple mechanism for users to turn off “irrelevant”
- DHRUVA TIRUMALA BUKKAPATNAM Geant4 Geometry on a GPU.
EGEE-III INFSO-RI Enabling Grids for E-sciencE EGEE and gLite are registered trademarks Stephen Childs Trinity College Dublin &
Geant4 in production: status and developments John Apostolakis (CERN) Makoto Asai (SLAC) for the Geant4 collaboration.
Parallelization of likelihood functions for data analysis Alfio Lazzaro CERN openlab Forum on Concurrent Programming Models and Frameworks.
The CMS Simulation Software Julia Yarba, Fermilab on behalf of CMS Collaboration 22 m long, 15 m in diameter Over a million geometrical volumes Many complex.
Introduction What is detector simulation? A detector simulation program must provide the possibility of describing accurately an experimental setup (both.
VMC workshop1 Ideas for G4 navigation interface using ROOT geometry A.Gheata ALICE offline week, 30 May 05.
PHENIX and the data grid >400 collaborators 3 continents + Israel +Brazil 100’s of TB of data per year Complex data with multiple disparate physics goals.
Firmware - 1 CMS Upgrade Workshop October SLHC CMS Firmware SLHC CMS Firmware Organization, Validation, and Commissioning M. Schulte, University.
Feedback from LHC Experiments on using CLHEP Lorenzo Moneta CLHEP workshop 28 January 2003.
The High Performance Simulation Project Status and short term plans 17 th April 2013 Federico Carminati.
STATUS OF THE UNIFIED SOLIDS LIBRARY Gabriele Cosmo/CERN Tatiana Nikitina/CERN.
1 P. Chu 1 Adapting XAL for LCLS EPICS Meeting, Vancouver Adapting XAL for LCLS Paul Chu - SLAC May 1, 2009.
G.Govi CERN/IT-DB 1 September 26, 2003 POOL Integration, Testing and Release Procedure Integration  Packages structure  External dependencies  Configuration.
Status Report on the Validation Framework S. Banerjee, D. Elvira, H. Wenzel, J. Yarba Fermilab 15th Geant4 Collaboration Workshop 10/06/
U-Solids: new geometrical primitives library for Geant4 and ROOT Marek Gayer CERN Physics Department (PH) Group Software Development for Experiments (SFT)
Computing Performance Recommendations #10, #11, #12, #15, #16, #17.
Geant4 CPU performance : an update Geant4 Technical Forum, CERN, 07 November 2007 J.Apostolakis, G.Cooperman, G.Cosmo, V.Ivanchenko, I.Mclaren, T.Nikitina,
Software Tools for Layout Optimization (Fermilab) Software Tools for Layout Optimization Harry Cheung (Fermilab) For the Tracker Upgrade Simulations Working.
Update on G5 prototype Andrei Gheata Computing Upgrade Weekly Meeting 26 June 2012.
Preliminary Ideas for a New Project Proposal.  Motivation  Vision  More details  Impact for Geant4  Project and Timeline P. Mato/CERN 2.
Marco Cattaneo Core software programme of work Short term tasks (before April 2012) 1.
Andrei Gheata (CERN) for the GeantV development team G.Amadio (UNESP), A.Ananya (CERN), J.Apostolakis (CERN), A.Arora (CERN), M.Bandieramonte (CERN), A.Bhattacharyya.
Enabling Grids for E-sciencE INFSO-RI Enabling Grids for E-sciencE Gavin McCance GDB – 6 June 2007 FTS 2.0 deployment and testing.
Site Services and Policies Summary Dirk Düllmann, CERN IT More details at
11/01/2012B.Couturier - Core Software Workshop 1 Software Development Infrastructure Main Topics Development tools Build and Release tools Tracking/Management.
CMS: T1 Disk/Tape separation Nicolò Magini, CERN IT/SDC Oliver Gutsche, FNAL November 11 th 2013.
Atlas Software May, 2000 K.Amako Status of Geant4 Physics Validation Atlas Software Week 10 May, Katsuya Amako (KEK)
Detector SimOOlation activities in ATLAS A.Dell’Acqua CERN-EP/ATC May 19th, 1999.
Improving the analysis performance Andrei Gheata ALICE offline week 7 Nov 2013.
JRA1 Meeting – 09/02/ Software Configuration Management and Integration EGEE is proposed as a project funded by the European Union under contract.
Vector Prototype Status Philippe Canal (For VP team)
Report on Vector Prototype J.Apostolakis, R.Brun, F.Carminati, A. Gheata 10 September 2012.
GeantV – status and plan A. Gheata for the GeantV team.
GeantV fast simulation ideas and perspectives Andrei Gheata for the GeantV collaboration CERN, May 25-26, 2016.
GeantV prototype at a glance A.Gheata Simulation weekly meeting July 8, 2014.
Status of TFluka: geometry and validation Andrei Gheata ALICE Off-line week, 21 Feb
SYSTEM INTEGRATION TESTING Getting ready for testing shifts Gunter Folger CERN PH/SFT Geant4 Collaboration Workshop 2011 SLAC.
Monthly video-conference, 18/12/2003 P.Hristov1 Preparation for physics data challenge'04 P.Hristov Alice monthly off-line video-conference December 18,
GeantV – Adapting simulation to modern hardware Classical simulation Flexible, but limited adaptability towards the full potential of current & future.
Processes and threads.
MICE Collaboration Meeting Saturday 22nd October 2005 Malcolm Ellis
Recent performance improvements in ALICE simulation/digitization
Vector Electromagnetic Physics Models & Field Propagation
A task-based implementation for GeantV
Status of Full Simulation for Muon Trigger at SLHC
GeantV – Parallelism, transport structure and overall performance
Report on Vector Prototype
Vincenzo Innocente CERN/EP/CMC
MuonGeoModel status of progress on main items
Priorities and contents of releases
Presentation transcript:

GeantV code sprint report Fermilab 3-8 October 2015 A. Gheata

Scope & attendance  Biannual workshop CERN/FNAL aiming to:  Make the point on the current project status and review individual reports (morning sessions)  Make joint code sprints in small groups on different hot subjects (afternoon sessions)  Decide on short to medium term goals and corresponding tasks  Definition of the “smoking gun” demonstrator  Hosted by Fermilab the week after the Geant4 collaboration meeting  Big thanks for their hospitality!  Participants  FNAL: P. Canal, D. Elvira, S. Yung Jun, G. Lima  CERN: J. Apostolakis, F. Carminati, A. Gheata, M. Novak, A. Ribon, S. Wenzel

The starting point briefly  Geometry  Scalar navigation demonstrated with CMS setup  Work on different solids ongoing  Voxel navigation in production  Physics  New (scalar) MS model ready to integrate with Geant4  Compton KN model ready (modulo a bug to be fixed)  -> Need for a general validation procedure  GeantV physics design/interfacing on the board KleinNishina comparison between G4 and Geant V

The starting point briefly  Scheduler  Concurrency issues even in lock-free rebasketizer  Non locality effects observed  NUMA awareness to be addressed  Re-use basket in next step  I/O  Concurrent streaming of hits demonstrated  Multiple threads pushing hit blocks in concurrent queue  Single thread writing to tree  Bottleneck in ROOT serializing & unzipping Lock-free algorithm (memory polling) Algorithm using spinlocks Rebasketizing

The starting point briefly  Cuda transport kernel  Coprocessor broker implemented  Offload track propagation for step  Still to be debugged  Vector physics on CUDA  Issues for reproducing previous results (FNAL CUDA prototype) upstream downstream Input basket

Progress on Design & Physics  Agreed with proposed design for interaction of kernel with physics process (classes & key methods)  Started to investigate (with help from Sandro) on the use of templates to avoid (or at least reduce) the virtual function calls  Decided to give priority to the following 3 electromagnetic processes for electrons:  Multiple scattering  Ionization  Bremsstrahlung  Complex from the point of view of the structure and interfaces for the physics  They will allow to refine the design of the whole physics, and then test the template mechanism  We did not discuss about SIMD Random Number Generation, but we will have to confront this at some point 6

Progress with GPU  Vector physics  Understood the bias seen from Compton (first bin sampling)  Found solution to reduce the bias (re-weighting the sample position instead of using the mid-point)  Understood performance of vector physics models wrt old FNAL GPU prototype and recovered reasonable gain in CPU/GPU (x2-3 compilation flag, x2-3 number of tracks)  Understand the design of the proposed physics interface (physics processes)  Identified number of items to improve the current implementation of vector physics models  Coprocessor: several fixes in setup, compilation, data structure transfers  Fix scheduling issues in the Coprocessor (missing setup)  Add physics to CUDA code path (run on CPU for now)  Fix issues with data structure alignment dissonance on CPU and GPU.  Resolve build/linking issue on GPU in master.  Tracking down issue with volume pointer value on GPU side. 7

KleinNishina comparison between G4 and Geant V Before After Detail (peak)

Progress with Geometry  Bug fixes on the tube and polycone, including visualization  Use of root visualization tools to speed up geometry debugging  Streamlined the treatment of special cases in polycone implementation 9

Progress with Scheduler  Agreed to change handling of baskets: from SOA (current) to AOS.  Track copying can be postponed to the moment the SOA needs to be dispatched to geometry and physics  Handling of AOS using track pointers is more lightweight from the point of view of memory copying (reshuffling not needed) and re-basketizing (copy pointers rather than data in concurrency mode)  Plan is to tackle this as soon as we finish more urgent business (geom. vectorization and physics validation with VecGeom)  Expected to improve Amdahl and general performance, but need  Track management as a pool instead of basket management (the basket will only be locally produced and used when dispatching)  Major redesign and requires many changes in the code 10

Validation DB  Developing new physics models brings up validation  What is the reference, how reproducible, what is the procedure?  A simulation Validation DB seems to be the solution  FNAL started to develop a tool for Geant4 (Hans Wenzel et al)  Web application on top of a DB  Select experiment, make selections, …  Content  Experimental results (thin target data) as reference for simulations  Results of previous releases (regression tests)

PoW for Validation DB  Hans Wenzel will prepare an “export pack” of the database and the associated facilities. He will provide you all the pointers.  We will develop a C++ API (all the code is in the GEANT svn repo, we will add this there) and we will modify some G4 example (e.g. example 19) to derive the validation data from the DB.  Once the proof-of-concept achieved, we will start a campaign to modify all G4 examples to work from this DB and give the corresponding data to our colleagues at FNAL for inclusion.  In general we should not include the data ourselves in the DB but rather provide them to FNAL and get back a new version of the database which is updated.  We will surely have a number of requirements that we will forward to our FNAL colleagues for consideration. We are of course happy to help also in the implementation, if this is feasible.  We will work at establishing and enforcing a group policy for whoever develops physics code in the group to derive the validation data from the database and to upload the relevant validation results (to be further detailed).  When this works, we will consider the possibility to prepare a global G4 policy about validation to discuss at the appropriate level. 12

Decision on Units  Internal units for GeantV will be GeV, centimeters, seconds and derived units  Test programs, particularly those derived from G4 can be written in any unit  GeantV production code will conform to the above units  All constexpr parameters will be initialized using units, not bare numbers  User code will just need to be using the right namespace (geant:: vs. clhep::)  We will have a phys const header in GeantV and a numerical / geom const header in VecGeom  This decision will be announced to the list 13

Decision on Cuts  Allow length and energy cuts  We will have transport cuts for all particles (energy/length and time)  Charged particles will have the option to be “ranged out”  Production cuts will coincide with transport cuts for all particles, potentially apart those with continuous-discrete processes 14

Decision on Physics interface  A&M proposal is accepted as presented (and amended)  We will provide feedback to the first implementation  Waiting for the code 15

Decision on Code maintenance  Code has been moved to gitlab  We have a single main branch (master)  Small fixes are checked in directly  Feature developments: pull; branch (local & remote); develop; merge (rebase) master into; make merge request  We will tag regularly (really!)  For the release we will tag/branch/stabilize/tag/release/patch 16

Smoking gun definition  Full CMS geometry  Basketized transport  Run in single thread/MT & scalability  VecGeom navigation with voxelisation & vectorisation + solids  Scoring  Mag Field (CashKarp)  Parametrised solenoid field with CMS dipole nominal strength  Tabulated physics, no MS  GPU & Xeon Phi will be included 17

Major elements missing for the “smoking gun”  Navigation in non-uniform magnetic field  Serialization of x-sec / final states  Make the current state working on GPU (full step taken by the coprocessor, physics + geometry)  Move physics code on GPU  Add missing management part to the CUDA side ( "NavigationState" on the GPU must give back right GPU pointer; the same state on the CPU gives back CPU pointer )  Put into place new navigation classes and infrastructure ( "LogicalVolume has pointer to a Navigator" )  Test new infrastructure for XRay Benchmarker  Change Geant-V side to make use of new navigation classes  Optimize navigation ( heuristic on which navigators to use when )  Understanding phys difference between G4 and GV 18