Status of the development of the Unified Solids library Marek Gayer, CERN PH/SFT 2 nd AIDA Annual Meeting, Frascati 2013.

Slides:



Advertisements
Similar presentations
AI Pathfinding Representing the Search Space
Advertisements

Advanced Manufacturing Laboratory Department of Industrial Engineering Sharif University of Technology Session # 8.
Christian Lauterbach COMP 770, 2/11/2009
Telescoping Languages: A Compiler Strategy for Implementation of High-Level Domain-Specific Programming Systems Ken Kennedy Rice University.
 Image Search Engine Results now  Focus on GIS image registration  The Technique and its advantages  Internal working  Sample Results  Applicable.
Chapter 3 2D AND 3D SPATIAL DATA REPRESENTATIONS 김 정 준.
Optimized Subdivisions for Preprocessed Visibility Oliver Mattausch, Jiří Bittner, Peter Wonka, Michael Wimmer Institute of Computer Graphics and Algorithms.
Logic Verification 1 Outline –Logic Verification Problem –Verification Approaches –Recursive Learning Approach Goal –Understand verification problem –Understand.
1 Presenter: Chien-Chih Chen Proceedings of the 2002 workshop on Memory system performance.
Chapter 2- Software Process Lecture 4. Software Engineering We have specified the problem domain – industrial strength software – Besides delivering the.
Week 1 - Friday.  What did we talk about last time?  C#  SharpDX.
Witek Pokorski, Radovan Chytracek, Jeremy McCormick, Giovanni Santin
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
PROOF: the Parallel ROOT Facility Scheduling and Load-balancing ACAT 2007 Jan Iwaszkiewicz ¹ ² Gerardo Ganis ¹ Fons Rademakers ¹ ¹ CERN PH/SFT ² University.
1 CE 530 Molecular Simulation Lecture 7 David A. Kofke Department of Chemical Engineering SUNY Buffalo
CHEP2000 February 2000 Impact of Software Review and Inspection Doris Burckhart CERN ATLAS DAQ/EF-1 Back-end software.
U-Solids: new geometrical primitives library for Geant4 and ROOT Marek Gayer CERN Physics Department (PH) Group Software Development for Experiments (SFT)
COMPUTER AIDED DESIGN -(CAD)-3
G EANT highlights kernel modules Gabriele Cosmo, CERN PH-SFT for the Geant4 Collaboration Gabriele Cosmo, CERN PH-SFT for the Geant4 Collaboration.
Kansas State University Department of Computing and Information Sciences CIS 736: Computer Graphics Wednesday, February 23, 2000 William H. Hsu Department.
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
Geant4 Acceptance Suite for Key Observables CHEP06, T.I.F.R. Mumbai, February 2006 J. Apostolakis, I. MacLaren, J. Apostolakis, I. MacLaren, P. Mendez.
Unified Solids Marek Gayer, John Apostolakis, Gabriele Cosmo, Andrei Gheata, Jean-Marie Guyader, Tatiana Nikitina CERN PH/SFT The 17 th Geant4 Collaboration.
Nick Draper 05/11/2008 Mantid Manipulation and Analysis Toolkit for ISIS data.
W. Pokorski - EP/SFT Simulation Project1 GDML - recent developments Witek Pokorski
Motion Planning in Games Mark Overmars Utrecht University.
CO1301: Games Concepts Dr Nick Mitchell (Room CM 226) Material originally prepared by Gareth Bellaby.
- DHRUVA TIRUMALA BUKKAPATNAM Geant4 Geometry on a GPU.
SIMO SIMulation and Optimization ”New generation forest planning system” Antti Mäkinen & Jussi Rasinmäki Dept. of Forest Resource Management.
Visual Computing Geometric Modelling 1 INFO410 & INFO350 S2 2015
1 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
Magnetic Field Issues for Simulation and Reconstruction N. Amapane, N. Neumeister Workshop on LHC Physics with High-p T Muons in CMS Bologna, April 9-12,
New software library of geometrical primitives for modelling of solids used in Monte Carlo detector simulations Marek Gayer, John Apostolakis, Gabriele.
Jump to first page The new ROOT geometry package Andrei Gheata - ALICE Institute of Space Sciences, Bucharest.
Parallelization of likelihood functions for data analysis Alfio Lazzaro CERN openlab Forum on Concurrent Programming Models and Frameworks.
QCAdesigner – CUDA HPPS project
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, Multimedia Chair Computation of room acoustics using programable video hardware Marcin Jędrzejewski.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
© 2006, National Research Council Canada © 2006, IBM Corporation Solving performance issues in OTS-based systems Erik Putrycz Software Engineering Group.
BREPS & STEP what's up and coming... Gabriele Cosmo CERN - IT/ASD GEANT4 Workshop September, 20th 1999 ESTEC, Noordwijk, The Netherlands.
TeraGrid Gateway User Concept – Supporting Users V. E. Lynch, M. L. Chen, J. W. Cobb, J. A. Kohl, S. D. Miller, S. S. Vazhkudai Oak Ridge National Laboratory.
STATUS OF THE UNIFIED SOLIDS LIBRARY Gabriele Cosmo/CERN Tatiana Nikitina/CERN.
G EANT highlights kernel modules Gabriele Cosmo, CERN PH-SFT for the Geant4 Collaboration Gabriele Cosmo, CERN PH-SFT for the Geant4 Collaboration.
Houston, Wiebe & Batty. (2004) RLE Sparse Level Sets. RLE Sparse Level Sets Ben Houston Mark Wiebe Christopher Batty Fluids and Level Sets Session.
Outline  Developments/fixes in the last year  Introduced in release 9.6 and patches  Planned for release 10.0 and ongoing …  Currently under development.
U-Solids: new geometrical primitives library for Geant4 and ROOT Marek Gayer CERN Physics Department (PH) Group Software Development for Experiments (SFT)
PERFORMANCE AND ANALYSIS WORKFLOW ISSUES US ATLAS Distributed Facility Workshop November 2012, Santa Cruz.
LCG – AA review 1 Simulation LCG/AA review Sept 2006.
IT / API 1 CERN 1-Feb-16 GBLIB: classes to deal with geometrical data Evgueni Tcherniaev IT / API CLHEP workshop, January.
Geant4 release 5.1 summary Gabriele Cosmo EP/SFT.
Current status of the development of the Unified Solids library Marek Gayer CERN PH/SFT.
Latest Improvements in the PROOF system Bleeding Edge Physics with Bleeding Edge Computing Fons Rademakers, Gerri Ganis, Jan Iwaszkiewicz CERN.
GDML “Geometry Description Markup Language” by Daniele Francesco Kruse University of Rome “Tor Vergata” European Organization for Nuclear Research.
Solid Modeling Dr. Scott Schaefer.
First INFN International School on Architectures, tools and methodologies for developing efficient large scale scientific computing applications Ce.U.B.
Introduction to Performance Tuning Chia-heng Tu PAS Lab Summer Workshop 2009 June 30,
MAUS Status A. Dobbs CM43 29 th October Contents MAUS Overview Infrastructure Geometry and CDB Detector Updates CKOV EMR KL TOF Tracker Global Tracking.
CERN, 7 November 2011 Anton Pytel Slovak Technical University TRIP FROM GENERATORS TO GEOMETRIES.
Computer Science and Engineering Parallelizing Feature Mining Using FREERIDE Leonid Glimcher P. 1 ipdps’04 Scaling and Parallelizing a Scientific Feature.
CS552: Computer Graphics Lecture 28: Solid Modeling.
Update on USolids/VecGeom integration in Geant4 Gabriele Cosmo, CERN EP/SFT.
Common Geometry Primitives library WP3 – date
Tom Van Steenkiste Supervisor: Predrag Buncic
Harvesting Runtime Values in Android Applications That Feature Anti-Analysis Techniques Presented by Vikraman Mohan.
HEP detector description supporting the full experiment life cycle
Real-Time Ray Tracing Stefan Popov.
GENERAL VIEW OF KRATOS MULTIPHYSICS
Presentation transcript:

Status of the development of the Unified Solids library Marek Gayer, CERN PH/SFT 2 nd AIDA Annual Meeting, Frascati 2013

Motivations for a common solids library Optimize and guarantee better long-term maintenance of ROOT and Gean4 solids libraries o A rough estimation indicates that about 70-80% of code investment for the geometry modeler concerns solids, to guarantee the required precision and efficiency in a huge variety of combinations Create a single high quality library to replace solid libraries in Geant4 and ROOT o Starting from what exists today in Geant4 and Root o Adopt a single type for each shape o Make fast Tessellated Solid and new Multi-Union o Reach complete conformance to GDML solids schema Create extensive testing suite Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Solids implemented so far Box Orb Trapezoid Sphere (+ sphere section) Tube (+ cylindrical section) Cone (+ conical section) Generic trapezoid Tetrahedron Arbitrary Trapezoid (ongoing) Multi-Union Tessellated Solid Polycone (close to be finished) Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Testing Suite Unified Solid Batch Test Optical Escape Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Unified Solid Batch Test New powerful diagnosis tool for testing solids of ROOT, Geant4 and Unified Solids library designed for transition to Unified Solids o The core part of Unified Solids testing o Testing Unified Solids together with existing Geant4 and ROOT solids o Testing methods with groups of points inside, outside and on surface o Compares performance and output values from different codes o Support for batch configuration and execution of tests o Contains also tests from the original SBT for points and voxels Helps us to make sure we have similar or better performance in each method and different test cases Useful to detect, report and fix numerous bugs or suspect return values in Geant4, ROOT and Unified Solids Two phases o Sampling phase (generation of data sets, implemented as C++ app.) o Analysis phase (data post-processing, implemented as MATLAB scripts) Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Visualization of scalar and vector data sets Marek Gayer - Status of the development of the Unified Solids library11/04/2013

3D plots allowing to overview data sets Marek Gayer - Status of the development of the Unified Solids library11/04/2013

3D visualization of investigated shapes Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Support for regions of data, focusing on sub-parts Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Visual analysis of differences Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Visual analysis of differences in 3D Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Graphs with comparison of performance Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Visualization of scalability performance for specific solids Marek Gayer - Status of the development of the Unified Solids library 11/04/2013

Inspection of values and differences of scalar and vector data sets Marek Gayer - Status of the development of the Unified Solids library11/04/2013

New Multi-Union solid Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Boolean Union solids Marek Gayer - Status of the development of the Unified Solids library Existing CSG Boolean solids (ROOT and Geant4) are represented as binary trees o To solve navigation requests, most of the solids composing a complex one have to be checked o Scalability is typically linear => low performance for solids composed of many parts Boolean Union solid: is binary tree of solids, either primitive or Boolean [The pictures were produced by users of Wikipedia “Captain Sprite” and “Zottie” and are available under Creative Commons Attribution-Share Alike 3.0 Unported license ] 11/04/2013

Multi-Union solid We implemented a new solid as a union of many solids using voxelization technique to optimize speed and scalability o 3D space partition for fast localization of components o Aiming for a log(n) scalability Useful for complex composites made of many solids Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Scaling of Multi-Union vs. Boolean solid Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Test multi-union solid for scalability measurements Marek Gayer - Status of the development of the Unified Solids library Union of random boxes, orbs and trapezoids (on pictures with 5, 10, 20 solids) 11/04/2013

The most performance critical methods Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Fast Tessellated Solid Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Fast Tessellated Solid Made from connected triangular and quadrangular facets forming solid Old implementation was slow, no spatial optimization We use spatial division of facets into 3D grid forming voxels (i.e. we are “voxelizing”) Voxelizer is based on bitmasks logical and operations during initialization and on pre- calculated list of facets candidates during runtime We are factor thousands faster for LHCb provided foil test case (164k facets) Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Fast Tessellated Solid Voxelization resulted in a significant performance enhancement in all performance critical methods Also, old Tesselated Solid had several weak parts of algorithm, used at initialization which had n 2 complexity. o This sometimes caused very huge delays when loading (e.g. in case of foil with 164k faces) o Rewrote to have n ∙ log n complexity o Loading the solid is much faster. What before took minutes, now takes seconds Implemented also in Geant4 9.6 as G4TesselatedSolid By improving design of classes and removing inefficiencies, total memory save is about ~50%, o Voxelization has overhead vs. original G4TS, which reduces to a total memory save of ~25% Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Speedup: 894x 10.3x 1000x+ ~8.7x 412x 1183x Speedup: 2423x 72x 1000x+ ~10.9x 1334x 1976x Speedup: 2925x 46x 1000x+ ~9.8x 1332x 2968x Performance – 164k/SCL5 with 10k/100k/1M voxels Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Speedup: 17x x x 166+ Speedup: 22x x 20+ 2x Performance – 1.1k/SCL 5 with 10k/1k voxels Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Memory footprint change in comparison with old version Marek Gayer - Status of the development of the Unified Solids library Voxels / Casekey-1.1k.gdmlfoil-2.5k.gdmlfoil-164k.gdml 1-51% (291kB)-48% (575kB)-50% (32.8M) % (391kB)-23% (843kb)-30% (46M) % (462kB)-15% (935kb)-29% (47.2M) % (907kB)+45% (1.6MB)-22% (51MB) % (3.7MB)+500% (6.6MB)+6% (70M) 11/04/2013

Basic primitives – cone, tube, sphere Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Cone performance Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Cone with small wedge performance Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Cone values comparison Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Tube performance Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Spherical section performance Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Polycone Marek Gayer - Status of the development of the Unified Solids library11/04/2013

New polycone implementation Polycone is an important solid, heavily used in most experimental setups Optimization for constructs where coordinate of Z sections can only increase (big majority of real cases) o Careful rewrite of Polycone for these cases Based on composition of separate instances of cones, tubes (or their sections) o Providing brief, readable, clean and fast code Significant performance improvement over Geant4 & ROOT Could bring to visible CPU improvement in full simulation of complex setups like ATLAS Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Polycone Scalability Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Current Polycone performance, 3 z sections Speedup factor 3.3x vs. Geant4, 7.6x vs. ROOT for most performance critical methods, i.e.: Inside, DistanceToOut, DistanceToIn Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Current Polycone performance, 10 z sections Speedup factor 8.3x vs. Geant4, 7.9x vs. ROOT for most performance critical methods Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Current Polycone performance, 100 z sections Speedup factor 34.3x vs. Geant4, 10.7 vs. ROOT for most performance critical methods Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Status of work Types and Unified Solids interface are defined Bridge classes for comparison with Geant4 and ROOT implemented Testing suite defined and deployed Implemented 9 primitives (Box, Orb, Trapezoid, Sphere, Tube, Cone, Generic trapezoid, Tetrahedron, Arbitrary trapezoid) Implemented new composed solids Multi-Union, Tessellated, Polycone (close to be finished) Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Future work plan Marek Gayer o Complete and eventually further optimize Polycone o Implement Polyhedra o Hand over the tasks to Tatiana Nikitina Tatiana Nikitina o Give priority to the remaining most critical solids and those where room for improvement can be easily identified o Systematically analyze and implement remaining solids in the new library Marek Gayer - Status of the development of the Unified Solids library11/04/2013

Thank you for your attention. ?????? Questions and Answers Marek Gayer - Status of the development of the Unified Solids library11/04/2013