User manual
Dymola 2015 FD01 Release Notes 17
3.3 Simulating a model
3.3.1 Simulation speed-up
Multi-core support
Dymola can parallelize the evaluation of model equations for calculation of the derivatives
for continuous-time integration.
This feature is activated by setting the flag
Advanced.ParallelizeCode = true
Dymola automatically inquires the number of cores.
Notes:
• Hyper-threading is included in this number, i.e. a dual-core processor is seen as 4
cores, and a quad-core as 8 cores.
• The Dymola calculated number of cores is seen in the command log (see below).
If a certain number of cores are to be used (including hyper-threading as above), the flag
Advanced.NumberOfCores can be set to any wanted (positive) number of cores, this value
overrides the automatically calculated value. An example of using this flag is when you
want to create code for a machine with a higher number of cores that the machine you work
on. To go back to using the automatically calculated number of cores instead, set this flag to
0. (This is also the default value of the flag.)
Notes:
• The compiler used must support OpenMP. For Visual Studio this means that you must
use Visual Studio Professional 2010 or later, or Visual Studio Express 2012 or later.
On Windows, the GCC version that Dymola supports, also supports OpenMP.
• Multi-core simulation is currently only supported for dassl, lsodar, euler and rkfix,
when neither using DLL nor embedded server (DDE).
• For source code generation the generated C-code will contain standard OpenMP-
pragmas that are supported by many compilers (see their documentation).
At translation Dymola finds out which equations that can be executed in parallel. The result
is a sequence of layers, where the layers have sections that can be executed in parallel.
The translation produces a log to be found in the log window.