Parallellising Geant4 John Allison Manchester University and Geant4 Associates International Ltd 16-Jan-2013Geant4-MT John Allison Hartree Meeting1.

Slides:



Advertisements
Similar presentations
The GATE-LAB system Sorina Camarasu-Pop, Pierre Gueth, Tristan Glatard, Rafael Silva, David Sarrut VIP Workshop December 2012.
Advertisements

Use of G EANT 4 in CMS AIHENP’99 Crete, April 1999 Véronique Lefébure CERN EP/CMC.
Maria Grazia Pia, INFN Genova 1 Part V The lesson learned Summary and conclusions.
Using FLUKA to study Radiation Fields in ERL Components Jason E. Andrews, University of Washington Vaclav Kostroun, Mentor.
14 User Documents and Examples I SLAC Geant4 Tutorial 3 November 2009 Dennis Wright Geant4 V9.2.p02.
CMS Full Simulation for Run-2 M. Hildrith, V. Ivanchenko, D. Lange CHEP'15 1.
Particle Detector Simulation (I) Using Geant4 Ahmed Sayed Hamed (master student)
Sergey Ananko Saint-Petersburg State University Department of Physics
REVIEW OF NA61 SOFTWRE UPGRADE PROPOSAL. Mandate The NA61 experiment is contemplating to rewrite its fortran software in modern technology and are requesting.
G EANT highlights kernel modules Gabriele Cosmo, CERN PH-SFT for the Geant4 Collaboration Gabriele Cosmo, CERN PH-SFT for the Geant4 Collaboration.
Validation and TestEm series Michel Maire for the Standard EM group LAPP (Annecy) July 2006.
User Documents and Examples I Sébastien Incerti Slides thanks to Dennis Wrigth, SLAC.
03/27/2003CHEP20031 Remote Operation of a Monte Carlo Production Farm Using Globus Dirk Hufnagel, Teela Pulliam, Thomas Allmendinger, Klaus Honscheid (Ohio.
Ian C. Smith 1 A portal-based system for quality assurance of radiotherapy treatment plans using Grid-enabled High Performance Computing clusters CR Baker.
Interface parallel session report Hajime Yoshida.
Offline Coordinators  CMSSW_7_1_0 release: 17 June 2014  Usage:  Generation and Simulation samples for run 2 startup  Limited digitization and reconstruction.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Event Generator Event Generators Information needed Event Generator Information Event Kinematic Information Generated Event Structure – generated particles.
Medical Accelerator F. Foppiano, M.G. Pia, M. Piergentili
7th December 2007Geant4 Manchester Seminar1 Geant4 A simulation toolkit Geometry and tracking 4th incarnation.
W. Pokorski - CERN Simulation Project1 Python binding for Geant4 toolkit using Reflex/PyROOT tool Witek Pokorski EuroPython 2006, CERN, Geneva
Detector Simulation on Modern Processors Vectorization of Physics Models Philippe Canal, Soon Yung Jun (FNAL) John Apostolakis, Mihaly Novak, Sandro Wenzel.
Andreas Morsch, CERN EP/AIP CHEP 2003 Simulation in ALICE Andreas Morsch For the ALICE Offline Project 2003 Conference for Computing in High Energy and.
Geant4 based simulation of radiotherapy in CUDA
ATLAS Data Challenges US ATLAS Physics & Computing ANL October 30th 2001 Gilbert Poulard CERN EP-ATC.
Detector Simulation Presentation # 3 Nafisa Tasneem CHEP,KNU  How to do HEP experiment  What is detector simulation?
Debugging parallel programs. Breakpoint debugging Probably the most widely familiar method of debugging programs is breakpoint debugging. In this method,
Alex Howard - Event Biasing Geant4 Users - Lisbon Event biasing and Variance Reduction - Geometrical Alex Howard, CERN Geant4 Users Workshop, Lisbon.
New software library of geometrical primitives for modelling of solids used in Monte Carlo detector simulations Marek Gayer, John Apostolakis, Gabriele.
LHCb production experience with Geant4 LCG Applications Area Meeting October F.Ranjard/ CERN.
G4GeneralParticleSource Class: Developed by ESA as the space radiation environment is often quite complex in energy and angular distribution, and requires.
Monday June 3rd 2002 AIDA 2.2 WorkshopAlex Howard Imperial College London Slide 1 Implementation of AIDA within Geant4 for Underground and Space Applications.
WLCG Overview Board, September 3 rd 2010 P. Mato, P.Buncic Use of multi-core and virtualization technologies.
Introduction What is detector simulation? A detector simulation program must provide the possibility of describing accurately an experimental setup (both.
Alex Howard, ETH, Zurich 13 th September 2012, 17 th Collaboration Meeting, Chartres 1 Geometrical Event Biasing Facility Alex Howard ETH, Zurich Geometrical.
The High Performance Simulation Project Status and short term plans 17 th April 2013 Federico Carminati.
Geant4 Training 2006 Short Course Katsuya Amako (KEK) Gabriele Cosmo (CERN) Susanna Guatelli (INFN Genova) Aatos Heikkinen (Helsinki Institute of Physics)
Geant4 on GPU prototype Nicholas Henderson (Stanford Univ. / ICME)
Parallelization Geant4 simulation is an embarrassingly parallel computational problem – each event can possibly be treated independently 1.
Pedro Arce Introducción a GEANT4 1 GAMOS tutorial RadioTherapy Exercises Pedro Arce Dubois CIEMAT
Update on G5 prototype Andrei Gheata Computing Upgrade Weekly Meeting 26 June 2012.
John Apostolakis & Makoto Asai for the Geant4 Collaboration 1(Draft) SNA-MC 2010.
Computing Issues for the ATLAS SWT2. What is SWT2? SWT2 is the U.S. ATLAS Southwestern Tier 2 Consortium UTA is lead institution, along with University.
Preliminary Ideas for a New Project Proposal.  Motivation  Vision  More details  Impact for Geant4  Project and Timeline P. Mato/CERN 2.
Susanna Guatelli Geant4 in a Distributed Computing Environment S. Guatelli 1, P. Mendez Lorenzo 2, J. Moscicki 2, M.G. Pia 1 1. INFN Genova, Italy, 2.
Maria Grazia Pia, INFN Genova and CERN1 Geant4 highlights of relevance for medical physics applications Maria Grazia Pia INFN Genova and CERN.
Predrag Buncic (CERN/PH-SFT) Software Packaging: Can Virtualization help?
General Introduction and prospect Makoto Asai (SLAC PPA/SCA)
1 Giuseppe G. Daquino 26 th January 2005 SoFTware Development for Experiments Group Physics Department, CERN Background radiation studies using Geant4.
GUINEA-PIG: Beam-beam interaction simulation status M. Alabau, P. Bambade, O. Dadoun, G. Le Meur, C. Rimbault, F. Touze LAL - Orsay D. Schulte CERN - Genève.
STAR Simulation. Status and plans V. Perevoztchikov Brookhaven National Laboratory,USA.
2011 Development Plan Makoto Asai (SLAC PPA/SCA) on behalf of the Geant4 Collaboration March 3 rd, Geant4 Technical Forum.
MONTE CARLO TRANSPORT SIMULATION Panda Computing Week 2012, Torino.
Event Mixing Rob Kutschke, Fermilab Software and Simulation Meeting October 5, 2011 Mu2e-doc-1874-v1.
A Short Course on Geant4 Simulation Toolkit Introduction
1 SLAC simulation workshop, May 2003 Ties Behnke Mokka and LCDG4 Ties Behnke, DESY and SLAC MOKKA: european (france) developed GEANT4 based simulation.
Random Number Testing and RDM
Kilohertz Decision Making on Petabytes
Releases and developments
Sharing Memory: A Kernel Approach AA meeting, March ‘09 High Performance Computing for High Energy Physics Vincenzo Innocente July 20, 2018 V.I. --
User Documents and Examples I
Introductory Course PTB, Braunschweig, June 2009
Short Course Siena, 5-6 October 2006
A Short Course on Geant4 Simulation Toolkit Introduction
G4GeneralParticleSource Class:
Geant4 Workshop 02 October 2002, CERN Hajime Yoshida
Introductory Course ORNL, May 2008
Short Course IEEE NSS/MIC 2003 Katsuya Amako (KEK) Makoto Asai (SLAC)
Advanced Examples Alex Howard, Imperial College, UK
CS Introduction to Operating Systems
Presentation transcript:

Parallellising Geant4 John Allison Manchester University and Geant4 Associates International Ltd 16-Jan-2013Geant4-MT John Allison Hartree Meeting1

Geant4 Open source radiation simulation toolkit Can handle very complex geometries – Millions of volumes – Isotopic composition of materials Wealth of physics – Electromagnetic physics down to a few eV – Choice of physics models – Cell chemistry (biological effects) and tracks particles and ions through geometry description – interactions, decay, multiple scattering, etc. 16-Jan-2013Geant4-MT John Allison Hartree Meeting2

History 1994: CERN-KEK initiative in object oriented design – GEANT3 (Fortran) unmaintainable; frozen – Particle tracking: a natural candidate for object oriented programming Particles, tracks, volumes, materials: all can be objects Different processes share common interface—similarly differently shaped volumes—so one can write code that tracks a particle of unknown type through a volume of unknown shape experiencing a list of possible processes of unknown type. Amazing!! Each particle has a list of possible processes Track this particle through this volume selecting a particular process with the smallest “distance to happening” “Distance to happening” has an exponential distribution according to material and cross-sections or, in the case of the transportation process, is the distance to the next geometrical boundary Energy loss and multiple scattering along the step : CERN R&D project RD44 – C++ chosen 1999: First public release. Roughly 100 physicists (and a few computer scientists) contributing all or part of their time – 27 FTEs at the last count 2012: Latest release: version : Multi-threaded version 10 planned 16-Jan-2013Geant4-MT John Allison Hartree Meeting3

Toolkit A set of libraries – Download and install (CMake) from geant4.cern.ch User writes C++ code to define: – Detector – Particles and processes – Primary particle moment vectors Optionally: – Scoring – Recording – Track stacking – Drawing 16-Jan-2013Geant4-MT John Allison Hartree Meeting4... G4RunManager* runManager = new G4RunManager; // Three mandatory user actions... // Geometry of detector and apparatus runManager->SetUserInitialization(new MyDetectorConstruction); // Set of physics processes for each desired particle runManager->SetUserInitialization(new MyPhysicsList); // Generate particle momentum vectors to be tracked each event runManager->SetUserAction(new MyPrimaryGeneratorAction); //...plus optional user actions, such as scoring, recording at // end of event or run, then either // a) start interactive session (type “/run/beamOn 100”) // b) read script of such commands, or (c) runManager->BeamOn(100); // 100 events...

Applications Distributed as a toolkit – User must build his/her own application – Every particle and nuclear physics experiment has one But public applications are available – ESA: MULASSIS in the web-based SPENVIS environment Users can define simple geometries and get doses – Medicine: GATE, GAMOS, TOPAS 16-Jan-2013Geant4-MT John Allison Hartree Meeting5

Parallellisation Application-level parallellisation – de facto practice Each job gets a different random number seed Output files concatenated afterwards – Billions of events on tens of thousands of CPUs Particle physics’s computing GRID Multi-threading – Prototype conversions of Geant4 9.4, 9.5 and (soon) 9.6 Use pthreads Threads share geometry 25 MB per thread (compared to 2GB per application!) Good scaling up to number of available cores—see poster 18% overhead compared to non-threaded version (was 30% on poster) – Geant4 version 10 will be multi-threaded Non-threaded version will still be available by compile-time switch Workshop 10 th -15 th January 2013 May use the std::thread class and associated classes (std::mutex, std::lock, etc.) in the C++11 (2011) standard – Not yet available on all platforms 16-Jan-2013Geant4-MT John Allison Hartree Meeting6

Parallellisation (2) Vectorisation – Not a good paradigm for random tracking of particles – Different tracks have totally different outcomes in terms of number of steps, contribution to score, etc. – One may start with a vector of tracks but the outcomes not easily vectored – A study involving track grouping and vectorisation within a volume – Track grouping is an overhead Graphics Processing Units (GPUs) – Intrinsically massively parallel – Not easily harnessed – Some investigations in progress supported by NVIDIA 16-Jan-2013Geant4-MT John Allison Hartree Meeting7

Other issues Reproducibility, i.e., the ability to recompute an event exactly – Needed for: debugging investigating rare events – Requires reproducibility of random number sequence – A problem if the random number generator is shared in a multi-threading environment – Would require sophisticated pre-allocation of random number seeds for each event and thread-local random number generators 16-Jan-2013Geant4-MT John Allison Hartree Meeting8

Summary Geant4 is compute-intensive It needs to capitalise on computing innovations (hardware and software) Application-level parallellism works well – 2 GB per application when memory is getting cheaper is not much of a problem Multi-threading in multi-core environments is an obvious way to go – A single job can exploit multi-core technology – Useful for quick looks (e.g., ESA’s MULASSIS or even for developers on multi- core laptops or servers) – Hand crafted prototypes MT versions of 9.4 and 9.5 have been released – A final hand crafted MT version of 9.6 will soon be released – Main development branch version is imminent – Beta release: June 2013 – Full release: November 2013 Watch this space!! 16-Jan-2013Geant4-MT John Allison Hartree Meeting9