skip to main content
research-article

Ebb: A DSL for Physical Simulation on CPUs and GPUs

Published: 02 May 2016 Publication History

Abstract

Designing programming environments for physical simulation is challenging because simulations rely on diverse algorithms and geometric domains. These challenges are compounded when we try to run efficiently on heterogeneous parallel architectures. We present Ebb, a Domain-Specific Language (DSL) for simulation, that runs efficiently on both CPUs and GPUs. Unlike previous DSLs, Ebb uses a three-layer architecture to separate (1) simulation code, (2) definition of data structures for geometric domains, and (3) runtimes supporting parallel architectures. Different geometric domains are implemented as libraries that use a common, unified, relational data model. By structuring the simulation framework in this way, programmers implementing simulations can focus on the physics and algorithms for each simulation without worrying about their implementation on parallel computers. Because the geometric domain libraries are all implemented using a common runtime based on relations, new geometric domains can be added as needed, without specifying the details of memory management, mapping to different parallel architectures, or having to expand the runtime’s interface.
We evaluate Ebb by comparing it to several widely used simulations, demonstrating comparable performance to handwritten GPU code where available, and surpassing existing CPU performance optimizations by up to 9 × when no GPU code exists.

References

[1]
Zachary DeVito, James Hegarty, Alex Aiken, Pat Hanrahan, and Jan Vitek. 2013. Terra: A multi-stage language for high-performance computing. In ACM SIGPLAN Notices, Vol. 48. ACM, 105--116.
[2]
Zachary DeVito, Niels Joubert, Francisco Palacios, Stephen Oakley, Montserrat Medina, Mike Barrientos, et al. 2011. Liszt: A domain specific language for building portable mesh-based PDE solvers. In Proceedings of the 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC’11). ACM, New York, NY, Article 9, 12 pages.
[3]
Pradeep Dubey, Pat Hanrahan, Ronald Fedkiw, Michael Lentine, and Craig Schroeder. 2011. PhysBAM: Physically based simulation. In ACM SIGGRAPH 2011 Courses. ACM, 10.
[4]
Tim Foley and Pat Hanrahan. 2011. Spark: Modular, composable shaders for graphics hardware. In ACM SIGGRAPH 2011 Papers (SIGGRAPH’11). ACM, New York, NY, Article 107, 12 pages.
[5]
Nolan Goodnight. 2007. CUDA/OpenGL fluid simulation. NVIDIA Corporation (2007).
[6]
Pat Hanrahan and Jim Lawson. 1990. A language for shading and lighting calculations. In Proceedings of the 17th Annual Conference on Computer Graphics and Interactive Techniques (SIGGRAPH’90). ACM, New York, NY, 289--298.
[7]
Peter Hawkins, Alex Aiken, Kathleen Fisher, Martin Rinard, and Mooly Sagiv. 2011. Data Representation Synthesis. Vol. 46. ACM.
[8]
Frédéric Hecht. 2012. New development in FreeFem++. J. Numer. Math. 20, 3--4 (2012), 251--265.
[9]
James Hegarty, John Brunhaver, Zachary DeVito, Jonathan Ragan-Kelley, Noy Cohen, Steven Bell, Artem Vasilyev, Mark Horowitz, and Pat Hanrahan. 2014. Darkroom: Compiling high-level image processing code into hardware pipelines. ACM Trans. Graph. 33, 4, Article 144 (July 2014), 11 pages.
[10]
Roberto Ierusalimschy, Luiz Henrique De Figueiredo, and Waldemar Celes. 2011. Passing a language through the eye of a needle. Commun. ACM 54, 7 (2011), 38--43.
[11]
Ian Karlin, Abhinav Bhatele, Bradford L. Chamberlain, Jonathan Cohen, Zachary Devito, Maya Gokhale, et al. 2012. LULESH Programming Model and Performance Ports Overview. Technical Report LLNL-TR-608824. 1--17.
[12]
Ian Karlin, Abhinav Bhatele, Jeff Keasler, Bradford L. Chamberlain, Jonathan Cohen, Zachary DeVito, et al. 2013. Exploring traditional and emerging parallel programming models using a proxy application. In 27th IEEE International Parallel & Distributed Processing Symposium (IEEE IPDPS 2013).
[13]
Andrey Kuzmin, Mathieu Luisier, and Olaf Schenk. 2013. Fast methods for computing selected elements of the Greens function in massively parallel nanoelectronic device simulations. In Euro-Par 2013 Parallel Processing, F. Wolf, B. Mohr, and D. Mey (Eds.). Lecture Notes in Computer Science, Vol. 8097. Springer, Berlin, 533--544.
[14]
Edward A. Luke. 1999. Loci: A deductive framework for graph-based algorithms. In Computing in Object-Oriented Parallel Environments. Springer, 142--153.
[15]
Edward A. Luke and Thomas George. 2005. Loci: A rule-based framework for parallel multi-disciplinary simulation synthesis. J. Funct. Program. 15, 3 (May 2005), 477--502.
[16]
LUL. 2012. Hydrodynamics Challenge Problem, Lawrence Livermore National Laboratory. Technical Report LLNL-TR-490254. 1--17.
[17]
Miles Macklin, Matthias Müller, Nuttapong Chentanez, and Tae-Yong Kim. 2014. Unified particle physics for real-time applications. ACM Trans. Graph. 33, 4 (2014), 104.
[18]
Gihan R. Mudalige, Mike B. Giles, Jeyarajan Thiyagalingam, István Z. Reguly, Carlo Bertolli, Paul H. J. Kelly, and Anne E. Trefethen. 2013. Design and initial performance of a high-level unstructured mesh framework on heterogeneous parallel systems. Parallel Comput. 39, 11 (2013), 669--692.
[19]
Kekoa Proudfoot, William R. Mark, Svetoslav Tzvetkov, and Pat Hanrahan. 2001. A real-time procedural shading system for programmable graphics hardware. In Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques (SIGGRAPH’01). ACM, New York, NY, 159--170.
[20]
Jonathan Ragan-Kelley, Andrew Adams, Sylvain Paris, Marc Levoy, Saman P. Amarasinghe, and Frédo Durand. 2012. Decoupling algorithms from schedules for easy optimization of image processing pipelines. ACM Trans. Graph. 31, 4 (2012), 32.
[21]
Fun Shing Sin, Daniel Schroeder, and Jernej Barbič. 2013. Vega: Non-linear FEM deformable object simulator. Comput. Graph. Forum 32, 1 (2013), 36--48.
[22]
Jos Stam. 1999. Stable fluids. In Proceedings of the 26th Annual Conference on Computer Graphics and Interactive Techniques. ACM Press/Addison-Wesley Publishing Co., 121--128.
[23]
Jos Stam. 2009. Nucleus: Towards a unified dynamics solver for computer graphics. In Proceedings of the 11th IEEE International Conference on Computer-Aided Design and Computer Graphics (CAD/Graphics’09). IEEE, 1--11.
[24]
Nicholas Wilt. 2013. The Cuda Handbook: A Comprehensive Guide to GPU Programming. Pearson Education.

Cited By

View all

Index Terms

  1. Ebb: A DSL for Physical Simulation on CPUs and GPUs

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Graphics
    ACM Transactions on Graphics  Volume 35, Issue 2
    May 2016
    154 pages
    ISSN:0730-0301
    EISSN:1557-7368
    DOI:10.1145/2882845
    Issue’s Table of Contents
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 02 May 2016
    Accepted: 01 December 2015
    Revised: 01 October 2015
    Received: 01 May 2015
    Published in TOG Volume 35, Issue 2

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. GPU computing
    2. Programming languages
    3. geometric data structures
    4. local computation
    5. parallel programming

    Qualifiers

    • Research-article
    • Research
    • Refereed

    Funding Sources

    • US Department of Energy
    • ExaCT and ExMatEx
    • DOE Exascale Co-Design Centers
    • Stanford Pervasive Parallelism Laboratory

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)37
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 14 Sep 2024

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    Get Access

    Login options

    Full Access

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media