Publications
2023
- MARCO: An Experimental High-Performance Compiler for Large-Scale Modelica ModelsGiovanni Agosta, Francesco Casella, Daniele Cattaneo, and 4 more authorsIn Proceedings of the 15th International Modelica Conference, Dec 2023
This paper introduces MARCO, a research compiler aimed at the efficient generation of efficient simulation code from a large-scale Modelica model. MARCO’s design goals, requirements, and specifications are dis- cussed in the paper, as well as the software architec- ture, the current development status, and a future develop- ment roadmap. The results of two test cases demonstrate MARCO’s capability to handle non-trivial Modelica mod- els with over 10 million equations very efficiently.
@inproceedings{agosta_marco_2023, address = {Aachen}, series = {Linköping {Electronic} {Conference} {Proceedings} 204}, title = {{MARCO}: {An} {Experimental} {High}-{Performance} {Compiler} for {Large}-{Scale} {Modelica} {Models}}, isbn = {978-91-8075-505-4}, doi = {10.3384/ecp20413}, booktitle = {Proceedings of the 15th {International} {Modelica} {Conference}}, author = {Agosta, Giovanni and Casella, Francesco and Cattaneo, Daniele and Cherubin, Stefano and Leva, Alberto and Scuttari, Michele and Terraneo, Federico}, month = dec, year = {2023}, keywords = {Modelica, MARCO, MLIR} }
- Clever DAE: Compiler Optimizations for Digital Twins at ScaleMichele Scuttari, Nicola Camillucci, Daniele Cattaneo, and 4 more authorsIn Proceedings of the 20th ACM International Conference on Computing Frontiers, May 2023
Modeling and simulation are fundamental activities in engineering to facilitate prototyping, verification and maintenance. Declarative modeling languages allow to simulate physical phenomena by expressing them in terms of Differential and Algebraic Equations (DAE) systems. In this paper, we focus on the problem of generating code for performing the numerical integration of the model equations, and in particular on the overhead introduced by external numerical solver libraries. We propose a novel methodology for minimizing the amount of equations which require to be solved through an external solver library, together with the number of computations that are required to computed the Jacobian matrix of the system. Through a prototype LLVM-based compiler, we demonstrate how this approach achieves a linear speed-up in simulation time with respect to the baseline.
@inproceedings{scuttari_clever_2023, address = {Bologna, Italy}, title = {Clever {DAE}: {Compiler} {Optimizations} for {Digital} {Twins} at {Scale}}, isbn = {979-8-4007-0140-5}, doi = {10.1145/3587135.3589945}, language = {en}, booktitle = {Proceedings of the 20th {ACM} {International} {Conference} on {Computing} {Frontiers}}, publisher = {ACM}, author = {Scuttari, Michele and Camillucci, Nicola and Cattaneo, Daniele and Agosta, Giovanni and Casella, Francesco and Cherubin, Stefano and Terraneo, Federico}, month = may, year = {2023}, keywords = {Modelica, DAE, IDA, MARCO}, pages = {344--350} }
2022
- Efficient Memory Management for Modelica SimulationsMichele Scuttari, Nicola Camillucci, Daniele Cattaneo, and 2 more authorsIn 13th Workshop on Parallel Programming and Run-Time Management Techniques for Many-Core Architectures and 11th Workshop on Design Tools and Architectures for Multicore Embedded Computing Platforms (PARMA-DITAM 2022), Jun 2022
The ever increasing usage of simulations in order to produce digital twins of physical systems led to the creation of specialized equation-based modeling languages such as Modelica. However, compilers of such languages often generate code that exploits the garbage collection memory management paradigm, which introduces significant runtime overhead. In this paper we explain how to improve the memory management approach of the automatically generated simulation code. This is achieved by addressing two different aspects. One regards the reduction of the heap memory usage, which is obtained by modifying functions whose resulting arrays could instead be allocated on the stack by the caller. The other aspect regards the possibility of avoiding garbage collection altogether by performing all memory lifetime tracking statically. We implement our approach in a prototype Modelica compiler, achieving an improvement of the memory management overhead of over 10 times compared to a garbage collected solution, and an improvement of 56 times compared to the production-grade compiler OpenModelica.
@inproceedings{scuttari_efficient_2022, title = {Efficient {Memory} {Management} for {Modelica} {Simulations}}, doi = {10.4230/OASIcs.PARMA-DITAM.2022.7}, publisher = {Schloss Dagstuhl-Leibniz-Zentrum f{\"u}r Informatik}, author = {Scuttari, Michele and Camillucci, Nicola and Cattaneo, Daniele and Terraneo, Federico and Agosta, Giovanni}, booktitle = {13th Workshop on Parallel Programming and Run-Time Management Techniques for Many-Core Architectures and 11th Workshop on Design Tools and Architectures for Multicore Embedded Computing Platforms (PARMA-DITAM 2022)}, month = jun, year = {2022}, keywords = {memory, Modelica, MARCO} }