Ebb: A DSL for Physical Simluation on CPUs and GPUs

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.

[1]  Eric Darve,et al.  Liszt: A domain specific language for building portable mesh-based PDE solvers , 2011, 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC).

[2]  Edward A. Luke,et al.  Loci: a rule-based framework for parallel multi-disciplinary simulation synthesis , 2005, J. Funct. Program..

[3]  Alexander Aiken,et al.  Data representation synthesis , 2011, PLDI '11.

[4]  Pat Hanrahan,et al.  A real-time procedural shading system for programmable graphics hardware , 2001, SIGGRAPH.

[5]  John Hart,et al.  ACM Transactions on Graphics , 2004, SIGGRAPH 2004.

[6]  Tae-Yong Kim,et al.  Unified particle physics for real-time applications , 2014, ACM Trans. Graph..

[7]  Edward A. Luke,et al.  Loci: A Deductive Framework for Graph-Based Algorithms , 1999, ISCOPE.

[8]  Jos Stam,et al.  Nucleus: Towards a unified dynamics solver for computer graphics , 2009, 2009 11th IEEE International Conference on Computer-Aided Design and Computer Graphics.

[9]  Olaf Schenk,et al.  Fast Methods for Computing Selected Elements of the Green's Function in Massively Parallel Nanoelectronic Device Simulations , 2013, Euro-Par.

[10]  Pat Hanrahan,et al.  Spark: modular, composable shaders for graphics hardware , 2011, ACM Trans. Graph..

[11]  Nicholas Wilt,et al.  The CUDA Handbook: A Comprehensive Guide to GPU Programming , 2013 .

[12]  Pat Hanrahan,et al.  A language for shading and lighting calculations , 1990, SIGGRAPH.

[13]  Ian Karlin,et al.  LULESH Programming Model and Performance Ports Overview , 2012 .

[14]  Frédo Durand,et al.  Decoupling algorithms from schedules for easy optimization of image processing pipelines , 2012, ACM Trans. Graph..

[15]  Jan Vitek,et al.  Terra: a multi-stage language for high-performance computing , 2013, PLDI.

[16]  Jernej Barbic,et al.  Vega: Non‐Linear FEM Deformable Object Simulator , 2013, Comput. Graph. Forum.

[17]  Anne E. Trefethen,et al.  Design and initial performance of a high-level unstructured mesh framework on heterogeneous parallel systems , 2013, Parallel Comput..

[18]  Jos Stam,et al.  Stable fluids , 1999, SIGGRAPH.

[19]  Frédéric Hecht,et al.  New development in freefem++ , 2012, J. Num. Math..

[20]  Ronald Fedkiw,et al.  PhysBAM: physically based simulation , 2011, SIGGRAPH '11.

[21]  Martin Schulz,et al.  Exploring Traditional and Emerging Parallel Programming Models Using a Proxy Application , 2013, 2013 IEEE 27th International Symposium on Parallel and Distributed Processing.

[22]  Pat Hanrahan,et al.  Darkroom , 2014, ACM Trans. Graph..