“Simit: A Language for Physical Simulation” by Kjolstad, Kamil, Ragan-Kelley, Levin, Sueda, et al. …
Conference:
Type(s):
Title:
- Simit: A Language for Physical Simulation
Session/Category Title: RENDERING & SIMULATION WITH GPUS
Presenter(s)/Author(s):
- Fredrik Kjolstad
- Shoaib Kamil
- Jonathan Ragan-Kelley
- David I. W. Levin
- Shinjiro Sueda
- Desai Chen
- Etienne Vouga
- Danny M. Kaufman
- Gurtej Kanwar
- Wojciech Matusik
- Saman Amarasinghe
Moderator(s):
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.
References:
- Bruce G. Baumgart. 1972. Winged Edge Polyhedron Representation. Technical Report. Stanford University.
- Nathan Bell and Michael Garland. 2008. Efficient Sparse Matrix-Vector Multiplication on CUDA. Technical Report. Nvidia Technical Report NVR-2008-004, Nvidia Corporation.
- Guy E. Blelloch. 1990. Vector Models for Data-Parallel Computing. Vol. 356. MIT Press, Cambridge.
- David Blythe. 2006. The direct3d 10 system. ACM Transactions on Graphics 25, 3 (July 2006), 724–734.
- Mario Botsch, David Bommes, and Leif Kobbelt. 2005. Efficient linear system solvers for mesh processing. In Mathematics of Surfaces XI. Springer, 62–83.
- Mario Botsch, Stefan Steinberg, Stephan Bischoff, and Leif Kobbelt. 2002. OpenMesh — A generic and efficient polygon mesh data structure. (2002).
- CGAL. 2015. Computational Geometry Algorithms Library. Retrieved from http://www.cgal.org. (2015). Accessed: 2015-09-24.
- Edgar F. Codd. 1970. A relational model of data for large shared data banks. Communications of the ACM 13, 6 (1970), 377–387.
- COMSOL AB. 2005. COMSOL Multiphysics User’s Guide. Version: September (2005).
- Erwin Coumans and others. 2006. Bullet physics library. Open Source: Bulletphysics.org 4, 6 (2006).
- Denis Demidov. 2015. AMGCL. Retrieved from http://ddemidov.github.io/amgcl.
- 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.
- 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.
- 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.
- Caroline M. Eastman and Stephen F. Weiss. 1982. Tree structures for high dimensionality nearest neighbor searching. Information Systems 7, 2 (1982), 115–122.
- Albert Einstein. 1916. The foundation of the general theory of relativity. Annalen der Physik 354 (1916), 769–822.
- Conal Elliott. 2001. Functional image synthesis. In Proceedings of Bridges.
- 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.
- 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
- Gaël Guennebaud, Benoît Jacob, and others. 2010. Eigen v3. Retrieved from http://eigen.tuxfamily.org.
- Brian Guenter and Sung-Hee Lee. 2009. Symbolic Dynamics and Geometry. AK Peters.
- 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.
- Richard Hamming. 2003. History of computer—software. In Art of Doing Science and Engineering: Learning to Learn. CRC Press.
- Pat Hanrahan and Jim Lawson. 1990. A language for shading and lighting calculations. In Computer Graphics (Proceedings of SIGGRAPH’90). 289–298.
- Frédéric Hecht. 2015. Private communication. (May 2015).
- Hibbit, Karlsson and Sorensen Inc. 1998. ABAQUS/Standard: User’s Manual. Vol. 1. Hibbit, Karlsson and Sorensen Inc.
- Gerard J. Holzmann. 1988. Beyond Photography. Prentice Hall.
- 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.
- David R. Kincaid, Thomas C. Oppe, and David M. Young. 1989. ITPACKV 2D User’s Guide.
- Peter Kohnke. 1999. ANSYS Theory Reference. Ansys.
- Karen Liu. 2014. Dynamic animation and robotics toolkit. http://dartsim.github.io.
- 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.
- 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.
- MATLAB. 2014. Version 8.3.0 (R2014a). MathWorks Inc., Natick, MA.
- 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.
- M. Mooney. 1940. A theory of large elastic deformation. Journal of Applied Physics 11, 9 (1940), 582–592.
- 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.
- 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.
- Julien Pommier and Yves Renard. 2005. Getfem++, an open source generic C++ library for finite element methods. http://download.gna.org/getfem/html/homepage/.
- 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
- 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/157997
- Mark Segal and Kurt Akeley. 1994. The OpenGL Graphics System: A Specification. Silicon Graphics, Inc.
- Fun Shing Sin, Daniel Schroeder, and J. Barbič. 2013. Vega: Non-linear FEM deformable object simulator. In Computer Graphics Forum, Vol. 32. 36–48.
- Russell Smith. 2004. Open Dynamics Engine v0.5 User Guide.
- 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 Languaes and Operating Systems.
- 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.
- 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/071
- 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).