Conference article

Exploiting Repeated Structures and Vectorization in Modelica

Joseph Schuchart
Center for Information Services and High Performance Computing, TU Dresden, Germany

Volker Waurich
Chair of Construction Machines and Conveying Technology, TU Dresden, Germany

Martin Flehmig
Center for Information Services and High Performance Computing, TU Dresden, Germany

Marcus Walther
Center for Information Services and High Performance Computing, TU Dresden, Germany

Wolfgang E. Nagel
Center for Information Services and High Performance Computing, TU Dresden, Germany

Ines Gubsch
Chair of Construction Machines and Conveying Technology, TU Dresden, Germany

Download articlehttp://dx.doi.org/10.3384/ecp15118265

Published in: Proceedings of the 11th International Modelica Conference, Versailles, France, September 21-23, 2015

Linköping Electronic Conference Proceedings 118:28, s. 265-272

Show more +

Published: 2015-09-18

ISBN: 978-91-7685-955-1

ISSN: 1650-3686 (print), 1650-3740 (online)

Abstract

Large and highly-detailed Modelica models are frequently modeled by utilizing repeated structures, which is a repetition of various elements that are linked together in an iterative manner. While the Modelica language standard supports the representation of repeated structures, it is still not clear how repeated structures can be handled efficiently during model compilation. Instead of preserving the compact notation from the model, all repeated equations are flattened and all array variables are expanded. This leads to unnecessary long compilation times and higher memory consumption. Another aspect that has been yet inadequately considered and is closely connected to repeated structures is vectorization. The vector units of modern CPUs can be engaged to perform SIMD (Single Instruction, Multiple Data) operations, executing the same instruction on multiple data points in parallel. This reveals a high potential for faster simulations. This paper discusses the advantages of utilizing repeated structures for modeling in order to achieve both faster compilation and simulation times. The potentials of preserving for loops throughout compilation are demonstrated using a basic implementation in the OpenModelica Compiler. The effect on the simulation time by enabling vectorization is demonstrated for an appropriate model.

Keywords

SIMD; Vectorization; OpenModelica; Translation; Repetitions

References

Matthias Arzt, Volker Waurich, and Jörg Wensch. Towards Utilizing Repeating Structures for Constant Time Compilation of Large Modelica Models. In Proceedings of the 6th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, EOOLT ’14, pages 35–38, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2953-8. doi: 10.1145/2666202.2666207. URL http://doi.acm.org/10.1145/2666202.2666207.

Martyn Corden. Requirements for Vectorizable Loops, 2012. URL https://software.intel.com/en-us/articles/requirements-for-vectorizable-loops. Accessed 2015-05-19.

Christoph Höger. Separate Compilation of Causalized Equations -Work in Progress. Proceedings of the 4th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, EOOLT 2011, Zurich, Switzerland, September 5, 2011, pages 113–120, 2011.

Intel. Intel Architecture Instruction Set Extensions Programming Reference. Intel, October 2014. URL https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf. Accessed 2015-05-19.

Saeed Maleki, Yaoqing Gao, Maria J. Garzaran, Tommy Wong, and David A. Padua. An evaluation of vectorizing compilers. In Parallel Architectures and Compilation Techniques (PACT), 2011 International Conference on, pages 372–382, Oct 2011. doi: 10.1109/PACT.2011.68. URL polaris.cs.uiuc.edu/~garzaran/doc/pact11.pdf.

OpenMP. OpenMP Application Program Interface. OpenMP Architecture Review Board, Jul 2013. URL http://www.openmp.org/mp-documents/OpenMP4.0.0.pdf.

Constantinos C. Pantelides. The Consistent Initialization of Differential-Algebraic Systems. SIAM Journal on Scientific and Statistical Computing, 9(2):213–231, 1988. doi: 10.1137/0909014. URL http://dx.doi.org/10.1137/0909014.

Robert E. Tarjan. Depth-First Search and Linear Graph Algorithms. SIAM Journal on Computing., pages 146–160, 1972. URL langevin.univ-tln.fr/cours/PAA/extra/Tarjan-1972.pdf.

Marcus Walther, Volker Waurich, Christian Schubert, Ines Gubsch, Andreas Hofmann, and Lars Mikelsons. Equation based parallelization of Modelica models. In Proceedings of the 10th International Modelica Conference, 2014.

Dirk Zimmer. Module-Preserving Compilation of Modelica Models. Proceedings of the 7th International Modelica Conference; Como; Italy; 20-22 September 2009, (2):880–889, 2009.

Citations in Crossref