Multithreaded compilation with Simulink

11 views (last 30 days)
p fontaine
p fontaine on 20 Mar 2025
Answered: p fontaine on 24 Mar 2025
Is there a way to perform multithreaded compilation or code generation with Simulink in order to reduce these activities duration ?
(My question is about the compilation process or the code generation process and not on the produced code)

Answers (2)

Abhiram
Abhiram on 24 Mar 2025
In a parallel computing environment, whenever conditions allow, you can increase the speed of code generation and compilation by building models containing large model reference hierarchies in parallel.
For example, if you have Parallel Computing Toolbox software, you can distribute code generation and compilation for each referenced model across the cores of a multicore host computer.
For further guidance, refer to the MATLAB Documentation page titled “Increase Code Generation Speed”:

p fontaine
p fontaine on 24 Mar 2025
I understand your answer but it does not seem to be an automatic multithtreaded compilation of a model at low level. The effort has to be done by the user in order to decompose its model and to write the building scripts that can be launched in parallel by the Parallel Computing Toolbox. Nothing to see with, for instance, what can be done by the visual studio IDE on C++ language which performs multithreaded compilation at the source file level.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!