Abstract
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.
Supplemental Material
Available for Download
Supplemental movie, appendix, image and software files for, Simit: A Language for Physical Simulation
- Bruce G. Baumgart. 1972. Winged Edge Polyhedron Representation. Technical Report. Stanford University. Google Scholar
- Nathan Bell and Michael Garland. 2008. Efficient Sparse Matrix-Vector Multiplication on CUDA. Technical Report. Nvidia Technical Report NVR-2008-004, Nvidia Corporation.Google Scholar
- Guy E. Blelloch. 1990. Vector Models for Data-Parallel Computing. Vol. 356. MIT Press, Cambridge. Google Scholar
Digital Library
- David Blythe. 2006. The direct3d 10 system. ACM Transactions on Graphics 25, 3 (July 2006), 724--734. Google Scholar
Digital Library
- Mario Botsch, David Bommes, and Leif Kobbelt. 2005. Efficient linear system solvers for mesh processing. In Mathematics of Surfaces XI. Springer, 62--83. Google Scholar
Digital Library
- Mario Botsch, Stefan Steinberg, Stephan Bischoff, and Leif Kobbelt. 2002. OpenMesh -- A generic and efficient polygon mesh data structure. (2002).Google Scholar
- CGAL. 2015. Computational Geometry Algorithms Library. Retrieved from http://www.cgal.org. (2015). Accessed: 2015-09-24.Google Scholar
- Edgar F. Codd. 1970. A relational model of data for large shared data banks. Communications of the ACM 13, 6 (1970), 377--387. Google Scholar
Digital Library
- COMSOL AB. 2005. COMSOL Multiphysics User’s Guide. Version: September (2005).Google Scholar
- Erwin Coumans and others. 2006. Bullet physics library. Open Source: Bulletphysics.org 4, 6 (2006).Google Scholar
- Denis Demidov. 2015. AMGCL. Retrieved from http://ddemidov.github.io/amgcl.Google Scholar
- Zachary DeVito, Niels Joubert, Francisco Palacios, Stephen Oakley, Montserrat Medina, Mike Barrientos, Erich Elsen, Frank Ham, Alex Aiken, Karthik Duraisamy, Eric Darve, Juan Alonso, and Pat Hanrahan. 2011. Liszt: A domain specific language for building portable mesh-based PDE solvers. In Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC’11). ACM, New York, NY, Article 9, 12 pages. Google Scholar
Digital Library
- Christian Dick, Joachim Georgii, and Rüdiger Westermann. 2011. A real-time multigrid finite hexahedra method for elasticity simulation using CUDA. Simulation Modelling Practice and Theory 19, 2 (2011), 801--816.Google Scholar
Cross Ref
- Pradeep Dubey, Pat Hanrahan, Ronald Fedkiw, Michael Lentine, and Craig Schroeder. 2011. PhysBAM: Physically based simulation. In ACM SIGGRAPH 2011 Courses (SIGGRAPH’11). ACM, New York, NY, Article 10, 22 pages. Google Scholar
Digital Library
- Caroline M. Eastman and Stephen F. Weiss. 1982. Tree structures for high dimensionality nearest neighbor searching. Information Systems 7, 2 (1982), 115--122.Google Scholar
Cross Ref
- Albert Einstein. 1916. The foundation of the general theory of relativity. Annalen der Physik 354 (1916), 769--822.Google Scholar
Cross Ref
- Conal Elliott. 2001. Functional image synthesis. In Proceedings of Bridges.Google Scholar
- François Faure, Jérémie Allard, Stéphane Cotin, Paul Neumann, Pierre-Jean Bensoussan, Christian Duriez, Hervé Delingette, and Laurent Grisoni. 2007. SOFA: A modular yet efficient simulation framework. In Surgetica 2007 - Computer-Aided Medical Interventions: Tools and Applications (Surgetica 2007, Gestes médicaux chirurgicaux assistés par ordinateur), Philippe Merloz and Jocelyne Troccaz (Eds.). Chambéry, France, 101--108.Google Scholar
- Eitan Grinspun, Anil N. Hirani, Mathieu Desbrun, and Peter Schröder. 2003. Discrete shells. In Proceedings of the 2003 ACM SIGGRAPH/Eurographics Symposium on Computer Animation (SCA’03). Eurographics Association, Aire-la-Ville, Switzerland, Switzerland, 62--67. http://dl.acm.org/citation.cfm?id=846276.846284 Google Scholar
Digital Library
- Gaël Guennebaud, Benoît Jacob, and others. 2010. Eigen v3. Retrieved from http://eigen.tuxfamily.org.Google Scholar
- Brian Guenter and Sung-Hee Lee. 2009. Symbolic Dynamics and Geometry. AK Peters.Google Scholar
- Leonidas Guibas and Jorge Stolfi. 1985. Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams. ACM Transactions on Graphics 4, 2 (1985), 74--123. Google Scholar
Digital Library
- Richard Hamming. 2003. History of computer—software. In Art of Doing Science and Engineering: Learning to Learn. CRC Press.Google Scholar
- Pat Hanrahan and Jim Lawson. 1990. A language for shading and lighting calculations. In Computer Graphics (Proceedings of SIGGRAPH’90). 289--298. Google Scholar
Digital Library
- Frédéric Hecht. 2015. Private communication. (May 2015).Google Scholar
- Hibbit, Karlsson and Sorensen Inc. 1998. ABAQUS/Standard: User’s Manual. Vol. 1. Hibbit, Karlsson and Sorensen Inc.Google Scholar
- Gerard J. Holzmann. 1988. Beyond Photography. Prentice Hall.Google Scholar
- Monica S. Lam, Jiwon Seo, and Stephen Guo. 2013. SociaLite: Datalog extensions for efficient social network analysis. In Proceedings of the IEEE 29th International Conference on Data Engineering. Google Scholar
Digital Library
- David R. Kincaid, Thomas C. Oppe, and David M. Young. 1989. ITPACKV 2D User’s Guide.Google Scholar
- Peter Kohnke. 1999. ANSYS Theory Reference. Ansys.Google Scholar
- Karen Liu. 2014. Dynamic animation and robotics toolkit. http://dartsim.github.io.Google Scholar
- Yucheng Low, Joseph Gonzalez, Aapo Kyrola, Danny Bickson, Carlos Guestrin, and Joseph M. Hellerstein. 2010. GraphLab: A new parallel framework for machine learning. In Proceedings of the Conference on Uncertainty in Artificial Intelligence. Google Scholar
Digital Library
- William R. Mark, R. Steven Glanville, Kurt Akeley, and Mark J. Kilgard. 2003. Cg: A system for programming graphics hardware in a c-like language. ACM Transactions on Graphics 22, 3 (July 2003), 896--907. Google Scholar
Digital Library
- MATLAB. 2014. Version 8.3.0 (R2014a). MathWorks Inc., Natick, MA.Google Scholar
- Aleka McAdams, Yongning Zhu, Andrew Selle, Mark Empey, Rasmus Tamstorf, Joseph Teran, and Eftychios Sifakis. 2011. Efficient elasticity for character skinning with contact and collisions. ACM Transactions on Graphics (TOG) 30 (2011), 37. Google Scholar
Digital Library
- M. Mooney. 1940. A theory of large elastic deformation. Journal of Applied Physics 11, 9 (1940), 582--592.Google Scholar
Cross Ref
- Steven G. Parker, James Bigler, Andreas Dietrich, Heiko Friedrich, Jared Hoberock, David Luebke, David McAllister, Morgan McGuire, Keith Morley, Austin Robison, and others. 2010. Optix: A general purpose ray tracing engine. ACM Transactions on Graphics (TOG) 29, 4 (2010), 66. Google Scholar
Digital Library
- Keshav Pingali, Donald Nguyen, Milind Kulkarni, Martin Burtscher, M. Amber Hassaan, Rashid Kaleem, Tsung-Hsien Lee, Andrew Lenharth, Roman Manevich, Mario Méndez-Lojo, Dimitrios Prountzos, and Xin Sui. 2011. The tao of parallelism in algorithms. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’11). ACM, New York, NY, 12--25. Google Scholar
Digital Library
- Julien Pommier and Yves Renard. 2005. Getfem++, an open source generic C++ library for finite element methods. http://download.gna.org/getfem/html/homepage/.Google Scholar
- Jonathan Ragan-Kelley, Andrew Adams, Sylvain Paris, Marc Levoy, Saman Amarasinghe, and Frédo Durand. 2012. Decoupling algorithms from schedules for easy optimization of image processing pipelines. ACM Transactions on Graphics 31, 4, Article 32 (July 2012), 12 pages. DOI:http://dx.doi.org/10.1145/2185520.2185528 Google Scholar
Digital Library
- Gregorio Ricci-Curbastro and Tullio Levi-Civita. 1901. Mthodes de calcul diffrentiel absoluet leurs applications. Mathematische Annalen 54 (1901), 125--201. http://eudml.org/doc/157997Google Scholar
Cross Ref
- Mark Segal and Kurt Akeley. 1994. The OpenGL Graphics System: A Specification. Silicon Graphics, Inc.Google Scholar
- Fun Shing Sin, Daniel Schroeder, and J. Barbič. 2013. Vega: Non-linear FEM deformable object simulator. In Computer Graphics Forum, Vol. 32. 36--48.Google Scholar
Cross Ref
- Russell Smith. 2004. Open Dynamics Engine v0.5 User Guide.Google Scholar
- Eric Sedlar, Sungpack Hong, Hassan Chafi, and Kunle Olukotun. 2012. Green-Marl: A DSL for easy and efficient graph analysis. In 17th International Conference on Architectural Support for Programming Languages and Operating Systems. Google Scholar
Digital Library
- Kiril Vidimče, Szu-Po Wang, Jonathan Ragan-Kelley, and Wojciech Matusik. 2013. Openfab: A programmable pipeline for multi-material fabrication. ACM Transactions on Graphics (TOG) 32, 4 (2013), 136. Google Scholar
Digital Library
- Richard Vuduc, James W. Demmel, and Katherine A. Yelick. 2005. OSKI: A library of automatically tuned sparse matrix kernels. In Proceedings of SciDAC, Journal of Physics: Conference Series, Vol. 16. 521--530. DOI:http://dx.doi.org/10.1088/1742-6596/16/1/071Google Scholar
Cross Ref
- Daniel Weber, Jan Bender, Markus Schnoes, Andre Stork, and Dieter Fellner. 2013. Efficient GPU data structures and methods to solve sparse linear systems in dynamics applications. Computer Graphics Forum 32, 1 (2013).Google Scholar
Index Terms
Simit: A Language for Physical Simulation
Recommendations
Green-Marl: a DSL for easy and efficient graph analysis
ASPLOS '12The increasing importance of graph-data based applications is fueling the need for highly efficient and parallel implementations of graph analysis software. In this paper we describe Green-Marl, a domain-specific language (DSL) whose high level language ...
EQL: A language for numerical computation
EQL, a language for numerical computation, has been implemented. This paper describes essential properties of the EQL language, which considerably simplifies numerical analysis and programming thanks to the following features: (1) elimination of ...
Green-Marl: a DSL for easy and efficient graph analysis
ASPLOS '12The increasing importance of graph-data based applications is fueling the need for highly efficient and parallel implementations of graph analysis software. In this paper we describe Green-Marl, a domain-specific language (DSL) whose high level language ...





Comments