Speed Rapid Acc. vs. Normal Mode

5 次查看(过去 30 天)
I'm using the outputs of my Simulink model for a Genetic Algorithm. Each run I update the tunable parameters using 'paramSet' ( see this link ) to avoid rebuilding my target.
However, I noticed that the rapid accelerator is slower than my normal mode simulation, even if I don't update any parameters!. I did some speed tests on the same model without changing any parameters:
  • Normal Mode (sim = 1000 sec) : Elapsed = 2.89 sec
  • Normal Mode (sim = 10000 sec): Elapsed = 12.78 sec
  • Rapid Mode (sim = 10 sec) : Elapsed = 4.72 sec
  • Rapid Mode (sim = 100 sec) : Elapsed = 4.96 sec
  • Rapid Mode (sim = 1000 sec) : Elapsed = 5.44 sec
  • Rapid Mode (sim = 10000 sec): Elapsed = 7.55 sec
So my rapid accelerator is faster when simulation time is long but it seems that it needs some time (I guess ~4.5 sec) in each run to build/check the target. Why is this happening? I built the target beforehand so it should not rebuild it each time (which it isn't because this takes much longer than the 4.5 sec). What is Simulink doing in those first 4.5 seconds?
%%% EDIT
I already saved some time by using the 'RapidAcceleratorUpToDateCheck','off' option. Now the test are approx 1 sec faster. But still not faster than Normal Mode for short simulation times. Is this as expected?

采纳的回答

J. van Delft
J. van Delft 2015-9-10
Problem solved. I recently upgraded to gcc-5.1 but this compiler is not supported by MATLAB. Apparently this messes with the rapid accelerator. Downgraded to gcc-4.7 and all works well again.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Manual Performance Optimization 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by