liu.seSearch for publications in DiVA
Change search
Link to record
Permanent link

Direct link
BETA
Stavåker, Kristian
Alternative names
Publications (10 of 13) Show all publications
Stavåker, K. (2015). Contributions to Simulation of Modelica Models on Data-Parallel Multi-Core Architectures. (Doctoral dissertation). Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>Contributions to Simulation of Modelica Models on Data-Parallel Multi-Core Architectures
2015 (English)Doctoral thesis, monograph (Other academic)
Abstract [en]

Modelica is an object-oriented, equation-based modeling and simulation language being developed through an international effort by the Modelica Association. With Modelica it is possible to build computationally demanding models; however, simulating such models might take a considerable amount of time. Therefore techniques of utilizing parallel multi-core architectures for faster simulations are desirable. In this thesis the topic of simulation of Modelica on parallel architectures in general and on graphics processing units (GPUs) in particular is explored. GPUs support code that can be executed in a data-parallel fashion. It is also possible to connect and run several GPUs together which opens opportunities for even more parallelism. In this thesis several approaches regarding simulation of Modelica models on GPUs and multi-core architectures are explored.

In this thesis the topic of expressing and solving partial differential equations (PDEs) in the context of Modelica is also explored, since such models usually give rise to equation systems with a regular structure, which can be suitable for efficient solution on GPUs. Constructs for PDE-based modeling are currently not part of the standard Modelica language specification. Several approaches on modeling and simulation with PDEs in the context of Modelica have been developed over the years. In this thesis we present selected earlier work, ongoing work and planned work on PDEs in the context of Modelica. Some approaches detailed in this thesis are: extending the language specification with PDE handling; using a software with support for PDEs and automatic discretization of PDEs; and connecting an external C++ PDE library via the functional mockup interface (FMI).

Finally the topic of parallel skeletons in the context of Modelica is explored. A skeleton is a predefined, generic component that implements a common specific pattern of computation and data dependence. Skeletons provide a high degree of abstraction and portability and a skeleton can be customized with user code. Using skeletons with Modelica opens up the possibility of executing heavy Modelica-based matrix and vector computations on multi-core architectures. A working Modelica-SkePU library with some minor necessary compiler extensions is presented.

Abstract [sv]

Modelica är ett objektorienterat, ekvationsbaserat modellerings- och simuleringsspråk som utvecklas via den internationella organisationen the Modelica Association. Med Modelica är det möjligt att bygga beräkningskrävande modeller vilket kan leda till långa simuleringstider. Därför är metoder för att utnyttja parallella flerkärniga arkitekturer för snabbare simuleringar önskvärda. I denna avhandling utforskas området simulering av Modelicamodeller på parallella arkitekturer i allmänhet och på grafikbearbetningsenheter (GPUs) i synnerhet. GPU-kod kan köras data-parallellt. Det är också möjligt att ansluta och köra flera GPUs tillsammans vilket öppnar upp möjligheter för ännu mer parallellism. I denna avhandling utforskas flera metoder avseende simulering av Modelicamodeller på GPUs och multi-core arkitekturer.

I denna avhandling utforskas också ämnet att uttrycka och lösa partiella differentialekvationer (PDE:er) i Modelica. Modeller innehållande PDE:er ger vanligtvis upphov till ekvationssystem med en regelbunden data-parallel struktur, som lämpar sig för effektiv lösning på grafikprocessorer. Konstruktioner för PDE-baserad modellering ingår för närvarande inte i språkspecifikationen för Modelicastandarden. Flera metoder för modellering och simulering av PDE:er med Modelica har utvecklats genom åren. I denna avhandling presenterar vi utvalda tidigare arbeten, pågående arbeten, och planerade arbeten med PDE:er med Modelica. Några av metoderna som beskrivs i denna avhandling är: utvidga språkspecifikationen med PDE-hantering; stöd för PDE:er och automatisk diskretisering av PDE:er med hjälp av speciell programvara; och att ansluta ett externt C++ PDE bibliotek via det så kallade functional mockup interfacet (FMI).

Slutligen studerar vi ämnet parallella skelett tillsammans med Modelica. Ett skelett är en fördefinierad, generisk programkomponent som implementerar ett gemensamt specifikt mönster av beräkning och databeroende. Skelett ger en hög grad av abstraktion och ett skelett kan skräddarsys med användarkod. Att använda skelett tillsammans med Modelica öppnar upp möjligheten att utföra tunga Modelicabaserade matris- och vektorberäkningar på flerkärniga arkitekturer. Ett fungerande Modelica-SkePU bibliotek tillsammans med några mindre kompilatorutvidgningar presenteras.

Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2015. p. 251
Series
Linköping Studies in Science and Technology. Dissertations, ISSN 0345-7524 ; 1666
National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:liu:diva-116338 (URN)10.3384/diss.diva-116338 (DOI)978-91-7519-068-6 (ISBN)
Public defence
2015-06-09, Visionen, hus B, Campus Valla, Linköping, 13:15 (English)
Opponent
Supervisors
Funder
CUGS (National Graduate School in Computer Science)
Available from: 2015-05-18 Created: 2015-03-25 Last updated: 2019-11-15Bibliographically approved
Stavåke, K., Fritzson, P., Song, C., Wlotzka, M. & Heuveline, V. (2014). PDE Modeling with Modelica via FMI import of Hiflow3 C++ Components with Parallel Multi-Core Simulations. In: : . Paper presented at In Proceedings of the 55th Scandinavian Conference on Simulation and Modeling (SIMS’2014),Aalborg, Denmark, Oct 21-22..
Open this publication in new window or tab >>PDE Modeling with Modelica via FMI import of Hiflow3 C++ Components with Parallel Multi-Core Simulations
Show others...
2014 (English)Conference paper, Published paper (Refereed)
Abstract [en]

The Modelica modeling and simulation language is widely used in academia and industry to model complex, coupled dynamic systems which can be described by systems of ordinary differential equations (ODE) or differential algebraic equations (DAE). Recent work by the authors showed a way to enable partial differential equation (PDE) modeling with Modelica via functional mock-up interface (FMI) import of C++ components based on the multi-purpose finite element library HiFlow3. The finite element method (FEM) is largely used in both research and industry as a reliable technique for solving PDE problems. In contrast to methods based on language extensions or automatic semi-discretizations in space, the approach with FMI import of HiFlow3 components into Modelica requires no change to the Modelica language, enables the use of specialized PDE solvers, and it allows for full flexibility in the choice of geometry, model parameters, and space discretization between simulation runs without recompilation. However, the computationally intensive PDE solving part in this approach can form a bottleneck in the simulations. In this work, we enhance the PDE solver by using a distributed memory parallelization based on a domain decomposition. As an example application, we consider a mechanical linear elasticity problem consisting of physical forces applied on a beam. Beams, plates and shells are common elements of solid structures with a sizable quantity of application in engineering design, appearing in fuselage, ship hulls, concrete roof structure, etc. The derivation of elastic stress strain relations is a crucial point for mechanical analysis and validation, as the bending properties of the structure effects greatly the stability properties. In this work the actual beam is modeled and solved in parallelusing a C++ HiFlow3 component whereas the physical force acting on the beam is modeled using Modelica. We use the OpenModelica development environment but the same approach can be adapted to other Modelica environments.

Keywords
Modelica, HiFlow3, OpenModelica, Partial Differential Equations, Finite Element Method, Functional Mock-Up Interface, Multi-Core, Parallel Computing
National Category
Electrical Engineering, Electronic Engineering, Information Engineering
Identifiers
urn:nbn:se:liu:diva-114205 (URN)
Conference
In Proceedings of the 55th Scandinavian Conference on Simulation and Modeling (SIMS’2014),Aalborg, Denmark, Oct 21-22.
Available from: 2015-02-13 Created: 2015-02-13 Last updated: 2017-03-28Bibliographically approved
Stavåker, K., Ronnås, S., Wlotzska, M., Heuveline, V. & Fritzson, P. (2013). PDE Modeling with Modelica via FMI Import of HiFlow3 C++ Components. In: SIMS 54th conference: . Paper presented at Scandinavian Conference on Modeling and Simulation (SIMS’2013), 16-18 October 2013, Bergen, Norway.
Open this publication in new window or tab >>PDE Modeling with Modelica via FMI Import of HiFlow3 C++ Components
Show others...
2013 (English)In: SIMS 54th conference, 2013Conference paper, Published paper (Refereed)
Abstract [en]

Despite an urgent need and desire in academia as well as in industry for modeling Partial Differential Equations (PDEs) using the increasingly popular Modelica modeling and simulation language, there is limited support for this available at the moment. In this work, we propose a solution based on importing PDE models with PDE solvers implemented using the general-purpose parallel finite element library HiFlow3 as models into the Modelica environment using the standard Functional Mock-up Interface. In contrast to methods based on language extensions or automatic semidiscretizations in space, this approach requires no change to the language, and enables the use of specialized PDE solvers. Furthermore, it allows for full flexibility in the choice of geometry, model parameters, and space discretization between simulation runs without recompilation needed. This makes it possible to exploit advanced features of the PDE solver, such as adaptive mesh refinement,and to build complex multi-physics simulations by coupling different models, of both PDE and DAE type, in a straightforward manner using Modelica. We illustrate our method with an example that couples a Modelica Proportional-Integral-Derivative controller to a PDE solver for the unsteady heat equation in a 3D domain.

Keywords
Modelica, HiFlow3, OpenModelica, Partial Differential Equations, Finite Element Method, Functional Mock-Up Interface
National Category
Electrical Engineering, Electronic Engineering, Information Engineering
Identifiers
urn:nbn:se:liu:diva-110333 (URN)
Conference
Scandinavian Conference on Modeling and Simulation (SIMS’2013), 16-18 October 2013, Bergen, Norway
Available from: 2014-09-08 Created: 2014-09-08 Last updated: 2014-10-07
Stavåker, K. (2011). Contributions to Parallel Simulation of Equation-Based Models on Graphics Processing Units. (Licentiate dissertation). Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>Contributions to Parallel Simulation of Equation-Based Models on Graphics Processing Units
2011 (English)Licentiate thesis, monograph (Other academic)
Abstract [en]

In this thesis we investigate techniques and methods for parallel simulation of equation-based, object-oriented (EOO) Modelica models on graphics processing units (GPUs). Modelica is being developed through an international effort via the Modelica Association. With Modelica it is possible to build computationally heavy models; simulating such models however might take a considerable amount of time. Therefor techniques of utilizing parallel multi-core architectures for simulation are desirable. The goal in this work is mainly automatic parallelization of equation-based models, that is, it is up to the compiler and not the end-user modeler to make sure that code is generated that can efficiently utilize parallel multi-core architectures. Not only the code generation process has to be altered but the accompanying run-time system has to be modified as well. Adding explicit parallel language constructs to Modelica is also discussed to some extent. GPUs can be used to do general purpose scientific and engineering computing. The theoretical processing power of GPUs has surpassed that of CPUs due to the highly parallel structure of GPUs. GPUs are, however, only good at solving certain problems of data-parallel nature. In this thesis we relate several contributions, by the author and co-workers, to each other. We conclude that the massively parallel GPU architectures are currently only suitable for a limited set of Modelica models. This might change with future GPU generations. CUDA for instance, the main software platform used in the thesis for general purpose computing on graphics processing units (GPGPU), is changing rapidly and more features are being added such as recursion, function pointers, C++ templates, etc.; however the underlying hardware architecture is still optimized for data-parallelism.

Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2011. p. 96
Series
Linköping Studies in Science and Technology. Thesis, ISSN 0280-7971 ; 1507
Keywords
Modelica, GPU, CUDA, OpenCL, Modeling, Simulation
National Category
Computer Systems
Identifiers
urn:nbn:se:liu:diva-71270 (URN)LiU-Tek-Lic--2011:46 (Local ID)978-91-7393-047-5 (ISBN)LiU-Tek-Lic--2011:46 (Archive number)LiU-Tek-Lic--2011:46 (OAI)
Presentation
2011-12-16, Alan Turing, Hus E, Campus Valla, Linköpings universitet, Linköping, 10:15 (English)
Opponent
Supervisors
Available from: 2011-11-25 Created: 2011-10-08 Last updated: 2014-10-08Bibliographically approved
Moghadam, A. H., Gebremedhin, M., Stavåker, K. & Fritzson, P. (2011). Simulation and benchmarking of Modelica models on multi-core architectures with explicit parallel algorithmic language extensions. In: Kessler, Christoph (Ed.), Fourth Swedish Workshop on Multi-Core Computing MCC-2011: . Paper presented at Fourth Swedish Workshop on Multi-Core Computing (MCC-2011), November 23-25, 2011, Linköping, Sweden (pp. 109-114). , S. 109-114
Open this publication in new window or tab >>Simulation and benchmarking of Modelica models on multi-core architectures with explicit parallel algorithmic language extensions
2011 (English)In: Fourth Swedish Workshop on Multi-Core Computing MCC-2011 / [ed] Kessler, Christoph, 2011, Vol. S. 109-114, p. 109-114Conference paper, Published paper (Other academic)
Abstract [en]

In this paper we introduce new parallel programming language construcructs which can be used in the algorithmic parts of Modelica models, and we present a benchmark test suite of suitable algorithmic Modelica models that makes use of the new constructs (such as models containing large matrix computations). We provide measurements of simulating three models fraom this benchmark test suite using single-core and multi-core CPUs as well as GPUs. 

Keywords
Simulation, Benchmarking, Modelica, Compilers, GPU, OpenCL
National Category
Computer Systems
Identifiers
urn:nbn:se:liu:diva-106592 (URN)
Conference
Fourth Swedish Workshop on Multi-Core Computing (MCC-2011), November 23-25, 2011, Linköping, Sweden
Available from: 2014-05-13 Created: 2014-05-13 Last updated: 2014-10-06
Stavåker, K., Rolls, D., Guo, J., Fritzson, P. & Scholz, S.-B. (2010). Compilation of modelica array computations into single assignment C for efficient execution on CUDA-enabled GPUs. In: Peter Fritzson, Edward Lee, François Cellier, David Broman (Ed.), Proceedings of the 3rd International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, EOOLT 2010 - In Conjunction with MODELS 2010: . Paper presented at Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, EOOLT 2010 - In Conjunction with MODELS 2010 (pp. 81-90). Linköping University Electronic Press
Open this publication in new window or tab >>Compilation of modelica array computations into single assignment C for efficient execution on CUDA-enabled GPUs
Show others...
2010 (English)In: Proceedings of the 3rd International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, EOOLT 2010 - In Conjunction with MODELS 2010 / [ed] Peter Fritzson, Edward Lee, François Cellier, David Broman, Linköping University Electronic Press , 2010, p. 81-90Conference paper, Published paper (Refereed)
Abstract [en]

Mathematical models, derived for example from discretisation of partial differential equations, often contain operations over large arrays. In this work we investigate the possibility of compiling array operations from models in the equation-based language Modelica into Single Assignment C (SAC). The SAC2C SAC compiler can generate highly efficient code that, for instance, can be executed on CUDAenabled GPUs. We plan to enhance the open-source Modelica compiler OpenModelica, with capabilities to detect and compile data parallel Modelica for-equations/arrayequations into SAC WITH-loops. As a first step we demonstrate the feasibility of this approach by manually inserting calls to SAC array operations in the code generated from OpenModelica and show how capabilities and runtimes can be extended. As a second step we demostrate the feasibility of rewriting parts of the OpenModelica simulation runtime system in SAC. Finally, we discuss SAC2Cs switchable target architectures and demonstrate one by harnessing a CUDA-enabled GPU to improve runtimes. To the best of our knowledge, compilation of Modelica array operations for execution on CUDA-enabled GPUs is a new research area.

Place, publisher, year, edition, pages
Linköping University Electronic Press, 2010
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740
Series
Proceedings of the 3rd International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, EOOLT 2010 - In Conjunction with MODELS 2010
Keywords
CUDA; Data parallel programming; GPU; Modelica; OpenModelica; SAC; Single assignment C
National Category
Engineering and Technology
Identifiers
urn:nbn:se:liu:diva-100695 (URN)978-91-7519-824-8 (ISBN)
Conference
Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, EOOLT 2010 - In Conjunction with MODELS 2010
Available from: 2013-11-12 Created: 2013-11-11 Last updated: 2018-02-20
Stavåker, K. & Fritzson, P. (2010). Generation of Simulation Code from Equation-Based Models for Execution on CUDA-Enabled GPUs. In: Proceedings of the 3rd Swedish Workshop on Multi-Core Computing: . Paper presented at Third Swedish Workshop on Multi-Core Computing, Göteborg, Sweden, November 18-19, 2010.
Open this publication in new window or tab >>Generation of Simulation Code from Equation-Based Models for Execution on CUDA-Enabled GPUs
2010 (English)In: Proceedings of the 3rd Swedish Workshop on Multi-Core Computing, 2010Conference paper, Published paper (Refereed)
Abstract [en]

In this paper we present some of our work on approaches of generating simulation code from equation-based mathematical models that can be executed on parallel architectures, especially CUDA-enabled GPUs. The models are written in the objectoriented equation-based language Modelica. We show that it is possible to automatically generate simulation code for purecontinuous-time models that can be reduced to an ordinary differential equation system without algebraic loops and where the initial values of all variables and parameters are known at compile time. Implementation work has been carried out in the OpenModelica compiler (an open source implementation of a Modelica compiler). In this paper we discuss previous, ongoing, and potentially future work

National Category
Electrical Engineering, Electronic Engineering, Information Engineering
Identifiers
urn:nbn:se:liu:diva-110258 (URN)
Conference
Third Swedish Workshop on Multi-Core Computing, Göteborg, Sweden, November 18-19, 2010
Available from: 2014-09-05 Created: 2014-09-05 Last updated: 2015-05-18Bibliographically approved
Östlund, P., Stavåker, K. & Fritzson, P. (2010). Parallel Simulation of Equation-Based Models on CUDA-Enabled GPUs. In: Proceedings of the 9th Workshop on Parallel/High-Performance Object-Oriented Scientific Computing POOSC '10: . Paper presented at 9th Workshop on Parallel/High-Performance Object-Oriented Scientific Computing (POOSC'10), October 18, 2010, Renoe-Tahoe Nevada, USA. New York, USA: ACM
Open this publication in new window or tab >>Parallel Simulation of Equation-Based Models on CUDA-Enabled GPUs
2010 (English)In: Proceedings of the 9th Workshop on Parallel/High-Performance Object-Oriented Scientific Computing POOSC '10, New York, USA: ACM , 2010Conference paper, Published paper (Refereed)
Abstract [en]

Our contributions with this work are methods and a prototype implementation for compiling and executing a limited set of equation-based mathematical models (written in the object-oriented equation-based modeling language Modelica) on CUDA-enabled GPUs. We look at methods of finding parallelism in Modelica models, that can be used on the massively parallel CUDA architecture. The methods have been implemented in a new back-end module of the OpenModelica compiler (an open-source Modelica compiler). This paper shows that it is possible to automatically generate simulation code for pure continuous-time models that can be reduced to an ordinary differential equation system without algebraic loops and where the initial values of all variables and parameters are known at compile time. It is possible to get some speedup compared with simulation on a single CPU core, a (approximated) relative speedup of 4.6 was for instance obtained for one model.

Place, publisher, year, edition, pages
New York, USA: ACM, 2010
National Category
Electrical Engineering, Electronic Engineering, Information Engineering
Identifiers
urn:nbn:se:liu:diva-110243 (URN)10.1145/2039312.2039317 (DOI)978-1-4503-0546-4 (ISBN)
Conference
9th Workshop on Parallel/High-Performance Object-Oriented Scientific Computing (POOSC'10), October 18, 2010, Renoe-Tahoe Nevada, USA
Available from: 2014-09-04 Created: 2014-09-04 Last updated: 2015-05-18Bibliographically approved
Maggio, M., Stavåker, K., Donida, F., Casella, F. & Fritzson, P. (2009). Parallel Simulation of Equation-based Object-Oriented Models with Quantized State Systems on a GPU. In: Proceedings 7th Modelica Conference, Como, Italy, Sep. 20-22, 2009: . Paper presented at The 7th International Modelica Conference, September 20-22, 2009, Como, Italy (pp. 251-260). Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>Parallel Simulation of Equation-based Object-Oriented Models with Quantized State Systems on a GPU
Show others...
2009 (English)In: Proceedings 7th Modelica Conference, Como, Italy, Sep. 20-22, 2009, Linköping: Linköping University Electronic Press, 2009, p. 251-260Conference paper, Published paper (Refereed)
Abstract [en]

This work focuses on the use of parallel hardware to improve the simulation speed of equation-based object-oriented Modelica models. With this intention,a method has been developed that allows for the translation of a restricted class of Modelica models to parallel simulation code, targeted for the Nvidia Tesla architecture and based on the Quantized State Systems(QSS) simulation algorithm. The OpenModelica Compiler (OMC) has been extended with a new back-end module for automatic generation of the simulation code that uses the CUDA extensions to the C language to be executable with a General Purpose Graphic Processing Unit (GPGPU). Preliminary performance measurments of a small example model havebeen done on the Tesla architecture.

Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2009
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740 ; 43
Keywords
Parallel Simulation; QSS algorithm; CUDA architecture; OpenModelica compiler; GPGPU
National Category
Software Engineering
Identifiers
urn:nbn:se:liu:diva-50799 (URN)10.3384/ecp09430032 (DOI)978-91-7393-513-5 (ISBN)
Conference
The 7th International Modelica Conference, September 20-22, 2009, Como, Italy
Available from: 2009-10-14 Created: 2009-10-14 Last updated: 2018-02-05Bibliographically approved
Lundvall, H., Stavåker, K., Fritzson, P. & Kessler, C. (2008). Automatic Parallelization of Simulation Code for Equation-based Models with Software Pipelining and Measurements on Three Platforms. In: Håkan Grahn (Ed.), Proceedings from the First Swedish Workshop on Multi-Core Computing, MCC-08, November 27-28, 2008, Ronneby, Sweden: . Paper presented at First Swedish Workshop on Multi-Core Computing, MCC-08, November 27-28, 2008, Ronneby, Sweden (pp. 60-69). Ronneby, Sweden: Blekinge Institute of Technology
Open this publication in new window or tab >>Automatic Parallelization of Simulation Code for Equation-based Models with Software Pipelining and Measurements on Three Platforms
2008 (English)In: Proceedings from the First Swedish Workshop on Multi-Core Computing, MCC-08, November 27-28, 2008, Ronneby, Sweden / [ed] Håkan Grahn, Ronneby, Sweden: Blekinge Institute of Technology , 2008, p. 60-69Conference paper, Published paper (Refereed)
Abstract [en]

In this work we report results from a new integrated method of automatically generating parallel code from Modelica models by combining parallelization at two levels of abstraction. Performing inline expansion of a Runge-Kutta solver combined with fine-grained automatic parallelization of the right-hand side of the resulting equation system opens up new possibilities for generating high performance code, which is becoming increasingly relevant when multi-core computers are becoming commonplace. An implementation, in the form of a backend module for the OpenModelica compiler, has been developed and used for measurements on two architectures: Intel Xeon and SGI Altix 3700 Bx2. This paper also contains some very recent results of a prototype implementation of this parallelization approach on the Cell BE processor architecture.

Place, publisher, year, edition, pages
Ronneby, Sweden: Blekinge Institute of Technology, 2008
Keywords
Modelica, parallel computing, automatic parallelization, pipelining, multicore processor, scheduling, code optimization, equation-based modeling and simulation
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-43713 (URN)74600 (Local ID)74600 (Archive number)74600 (OAI)
Conference
First Swedish Workshop on Multi-Core Computing, MCC-08, November 27-28, 2008, Ronneby, Sweden
Available from: 2009-10-10 Created: 2009-10-10 Last updated: 2018-01-12Bibliographically approved
Organisations

Search in DiVA

Show all publications