Conference article

A Data-Parallel Algorithmic Modelica Extension for Efficient Execution on Multi-Core Platforms

Mahder Gebremedhin
Department of Computer and Information Science, Linköping University, Linköping, Sweden

Afshin Hemmati Moghadam
Department of Computer and Information Science, Linköping University, Linköping, Sweden

Peter Fritzson
Department of Computer and Information Science, Linköping University, Linköping, Sweden

Kristian Stavåker
Department of Computer and Information Science, Linköping University, Linköping, Sweden

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

Published in: Proceedings of the 9th International MODELICA Conference; September 3-5; 2012; Munich; Germany

Linköping Electronic Conference Proceedings 76:41, s. 393-404

Show more +

Published: 2012-11-19

ISBN: 978-91-7519-826-2

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

Abstract

New multi-core CPU and GPU architectures promise high computational power at a low cost if suitable computational algorithms can be developed. However; parallel programming for such architectures is usually non-portable; low-level and error-prone. To make the computational power of new multi-core architectures more easily available to Modelica modelers; we have developed the ParModelica algorithmic language extension to the high-level Modelica modeling language; together with a prototype implementation in the OpenModelica framework. This enables the Modelica modeler to express parallel algorithms directly at the Modelica language level. The generated code is portable between several multi-core architectures since it is based on the OpenCL programming model. The implementation has been evaluated on a benchmark suite containing models with matrix multiplication; Eigen value computation; and stationary heat conduction. Good speedups were obtained for large problem sizes on both multi-core CPUs and GPUs. To our knowledge; this is the first high-performing portable explicit parallel programming extension to Modelica.

Keywords

Parallel; Simulation; Benchmarking; Modelica; Compiler; GPU; OpenCL; Multi-Core

References

[1] Modelica Association. The Modelica Language Specification Version 3.2; March 24th 2010. http://www.modelica.org. Modelica Association. Modelica Standard Library 3.1. Aug. 2009. http://www.modelica.org./

[2] Open Source Modelica Consortium. OpenModelica System Documentation Version 1.8.1; April 2012. http://www.openmodelica.org/

[3] Peter Fritzson. Principles of Object-Oriented Modeling and Simulation with Modelica 2.1. Wiley-IEEE Press; 2004. doi: 10.1109/9780470545669.

[4] Peter Aronsson. Automatic Parallelization of Equation-Based Simulation Programs; PhD thesis; Dissertation No. 1022; Linköping University; 2006.

[5] Håkan Lundvall. Automatic Parallelization using Pipelining for Equation-Based Simulation Languages; Licentiate thesis No. 1381; Linköping University; 2008.

[6] Håkan Lundvall; Kristian Stavåker; Peter Fritzson; Christoph Kessler: Automatic Parallelization of Simulation Code for Equation-based Models with Software Pipelining and Measure-ments on Three Platforms. MCC’08 Workshop; Ronneby; Sweden; November 27-28; 2008.

[7] Per Östlund. Simulation of Modelica Models on the CUDA Architecture. Master Thesis. LIU-IDA/LITH-EX-A-09/062-SE. Linköping Univer-sity; 2009.

[8] Kristian Stavåker; Peter Fritzson. Generation of Simulation Code from Equation-Based Models for Execution on CUDA-Enabled GPUs. MCC’10 Workshop; Gothenburg; Sweden; November 18-19; 2010.

[9] Matthias Korch and Thomas Rauber. Scalable parallel rk solvers for odes derived by the method of lines. In Harald Kosch; Laszlo Böszörményi; and Hermann Hellwagner; editors; Euro-Par; vol-ume 2790 of Lecture Notes in Computer Science; pages 830-839. Springer; 2003.

[10] Christoph Kessler and Peter Fritzson. NestStep-Modelica – Mathematical Modeling and Bulk-Synchronous Parallel Simulation. In Proc. of PARA’06; Umeå; June 19-20; 2006. In Lecture Notes of Computer Science (LNCS) Vol 4699; pp 1006-1015; Springer Verlag; 2006.

[11] Martin Sjölund; Robert Braun; Peter Fritzson and Petter Krus. Towards Efficient Distributed Simu-lation in Modelica using Transmission Line Mod-eling. In Proceedings of the 3rd International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools; (EOOLT’2010); Published by Linköping University Electronic Press; www.ep.liu.se; In conjunction with MOD-ELS’2010; Oslo; Norway; Oct 3; 2010.

[12] Francois Cellier and Ernesto Kofman. Continuous System Simulation. Springer; 2006.

[13] Khronos Group; Open Standards for Media Authoring and Acceleration; OpenCL 1.1; accessed Sept 15; 2011. http://www.khronos.org/opencl/

[14] The OpenCL Specication; Version: 1.1; Document Revision: 44; accessed June 30 2011. http://www.khronos.org/registry/cl/specs/opencl-1.1.pdf

[15] NVIDIA CUDA; accessed September 15 2011. http://www.nvidia.com/object/cuda home new.html

[16] NVIDIA CUDA programming guide; accessed 30 June 2011. http://developer.download.nvidia.com/ compute/cuda/4 0 rc2/toolkit/docs/CUDA C Pro-gramming Guide.pdf

[17] OpenCL Programming Guide for the CUDA Architecture; Appendix A; accessed June 30 2011. http://developer.download.nvidia.com/compute/DevZone/docs/html/OpenCL/doc/OpenCL Pro-gramming Guide.pdf

[18] AMD OpenCL; System Requirements & Driver Compatibility; accessed June 30 2011. http://developer.amd.com/sdks/AMDAPPSDK/pages/DriverCompatibility.aspx

[19] INTEL OpenCL; Technical Requirements; accessed June 30 2011. http://software.intel.com/enus/articles/opencl-release-notes/

[20] OpenCL Work-Item Built-In Functions; accessed June 30 2011. http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/workItemFunctions.html

[21] Jack J. Dongarra; J. Bunch; Cleve Moler; and G. W. Stewart. LINPACK User’s Guide. SIAM; Philadelphia; PA; 1979.

[22] Ian N. Sneddon. Fourier Transforms. Dover Publications; 2010. ISBN-13: 978-0486685229.

[23] John H. Lienhard IV and John H. Lienhard V. A Heat Transfer Textbook. Phlogiston Press Cambridge; Massachusetts; U.S.A; 4th edition; 2011.

[24] Intel Xeon E5520 CPU Specifications; accessed October 28 2011. http://ark.intel.com/products/40200/Intel-Xeon-Processor-E5520-(8M-Cache-2 26-GHz-5 86-GTs-Intel-QPI)

[25] NVIDIA Tesla M2050 GPU Specifications; accessed June 30 2011. http://www.nvidia.com/docs/IO/43395/BD-05238-001 v03.pdf

[26] Cyril Faure. Real-time simulation of physical models toward hardware-in-the-loop validation. PhD Thesis. University of Paris East; October 2011.

Citations in Crossref