The first step in Modelica compilation results in an ODE or a DAE equation system, depending on the specific Modelica model. The Modelica compiler typically performs optimizations on this system of equations to reduce its size. The optimized code consists of simple arithmetic operations, assignments and function calls.
This paper presents the implementation of an automatic parallelization tool that builds a task graph from the optimized code produced by a commercial Modelica compiler. Various scheduling algorithms have been implemented, as well as specific enhancements to adapt them to the fine grain task graphs produced by our tool. Finally, the tool generates simulation code, in a master-slave fashion, using MPI. Benchmarking including speedup measurements of parallelize simulations are also presented.