Simit

With existing programming tools, writing high-performance simulation code is labor intensive and requires sacrificing readability and portability. The alternative is to prototype simulations in a high-level language like Matlab, thereby sacrificing performance. The Matlab programming model naturally describes the behavior of an entire physical system using the language of linear algebra. However, simulations also manipulate individual geometric elements, which are best represented using linked data structures like meshes. Translating between the linked data structures and linear algebra comes at significant cost, both to the programmer and to the machine. High-performance implementations avoid the cost by rephrasing the computation in terms of linked or index data structures, leaving the code complicated and monolithic, often increasing its size by an order of magnitude. In this article, we present Simit, a new language for physical simulations that lets the programmer view the system both as a linked data structure in the form of a hypergraph and as a set of global vectors, matrices, and tensors depending on what is convenient at any given time. Simit provides a novel assembly construct that makes it conceptually easy and computationally efficient to move between the two abstractions. Using the information provided by the assembly construct, the compiler generates efficient in-place computation on the graph. We demonstrate that Simit is easy to use: a Simit program is typically shorter than a Matlab program; that it is high performance: a Simit program running sequentially on a CPU performs comparably to hand-optimized simulations; and that it is portable: Simit programs can be compiled for GPUs with no change to the program, delivering 4 to 20× speedups over our optimized CPU code.

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

[2]  Bruce G. Baumgart Winged edge polyhedron representation. , 1972 .

[3]  David K. McAllister,et al.  OptiX: a general purpose ray tracing engine , 2010, ACM Trans. Graph..

[4]  Gerald Holzmann,et al.  Beyond Photography: The Digital Darkroom , 1988 .

[5]  Jan Bender,et al.  Efficient GPU Data Structures and Methods to Solve Sparse Linear Systems in Dynamics Applications , 2013, Comput. Graph. Forum.

[6]  Andreas Dietrich,et al.  OptiX: a general purpose ray tracing engine , 2010, SIGGRAPH 2010.

[7]  Richard E. Nance,et al.  History of computer simulation software: An initial perspective , 2017, 2017 Winter Simulation Conference (WSC).

[8]  Joseph E. Gonzalez,et al.  GraphLab: A New Parallel Framework for Machine Learning , 2010 .

[9]  Keshav Pingali,et al.  The tao of parallelism in algorithms , 2011, PLDI '11.

[10]  Thomas C. Oppe,et al.  ITPACKV 2D user's guide , 1989 .

[11]  Michael Garland,et al.  Efficient Sparse Matrix-Vector Multiplication on CUDA , 2008 .

[12]  Raymond A Wildman,et al.  Postprocessing of Voxel-Based Topologies for Additive Manufacturing Using the Computational Geometry Algorithms Library (CGAL) , 2015 .

[13]  A. Einstein The Foundation of the General Theory of Relativity , 1916 .

[14]  Michel Salaün,et al.  High‐order extended finite element method for cracked domains , 2005 .

[15]  Leonidas J. Guibas,et al.  Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams , 1983, STOC.

[16]  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).

[17]  Mark Segal,et al.  The OpenGL Graphics System: A Specification , 2004 .

[18]  F. E. A Relational Model of Data Large Shared Data Banks , 2000 .

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

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

[21]  Mathieu Desbrun,et al.  Discrete shells , 2003, SCA '03.

[22]  N. S. Barnett,et al.  Private communication , 1969 .

[23]  Leif Kobbelt,et al.  OpenMesh: A Generic and Efficient Polygon Mesh Data Structure , 2002 .

[24]  Pierre Alliez,et al.  Computational geometry algorithms library , 2008, SIGGRAPH '08.

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

[26]  P. Cinquin Gestes médico-chirurgicaux assistes par ordinateur , 1993 .

[27]  Leonidas J. Guibas,et al.  Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams , 1983, STOC.

[28]  David Blythe The Direct3D 10 system , 2006, ACM Trans. Graph..

[29]  Andrew Selle,et al.  Efficient elasticity for character skinning with contact and collisions , 2011, SIGGRAPH 2011.

[30]  David Bommes,et al.  Efficient Linear System Solvers for Mesh Processing , 2005, IMA Conference on the Mathematics of Surfaces.

[31]  Caroline M. Eastman,et al.  Tree structures for high dimensionality nearest neighbor searching , 1982, Inf. Syst..

[32]  Hervé Delingette,et al.  SOFA: A modular yet efficient simulation framework , 2007 .

[33]  山田 祐,et al.  Open Dynamics Engine を用いたスノーボードロボットシミュレータの開発 , 2007 .

[34]  Brian Guenter,et al.  Symbolic Dynamics and Geometry: Using D* in Graphics and Game Programming , 2009 .

[35]  Guy E. Blelloch,et al.  Vector Models for Data-Parallel Computing , 1990 .

[36]  Karen Liu Dynamic Animation and Robotics Toolkit , 2014 .

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

[38]  M. M. G. Ricci,et al.  Méthodes de calcul différentiel absolu et leurs applications , 1900 .

[39]  Katherine Yelick,et al.  OSKI: A library of automatically tuned sparse matrix kernels , 2005 .

[40]  Wojciech Matusik,et al.  OpenFab , 2013, ACM Trans. Graph..

[41]  Monica S. Lam,et al.  SociaLite: Datalog extensions for efficient social network analysis , 2013, 2013 IEEE 29th International Conference on Data Engineering (ICDE).

[42]  William R. Mark,et al.  Cg: a system for programming graphics hardware in a C-like language , 2003, ACM Trans. Graph..

[43]  Conal Elliott,et al.  Functional Image Synthesis , 2001 .

[44]  Rüdiger Westermann,et al.  A real-time multigrid finite hexahedra method for elasticity simulation using CUDA , 2011, Simul. Model. Pract. Theory.

[45]  Kunle Olukotun,et al.  Green-Marl: a DSL for easy and efficient graph analysis , 2012, ASPLOS XVII.

[46]  M. Mooney A Theory of Large Elastic Deformation , 1940 .