Seth on Simulink

March 31st, 2009

Parallel Computing with Simulink: Model Reference Builds

Have you seen the MATLAB Channel on YouTube??  I like the way you can express an idea using video, describe how things work, and then watch it work.  That is why I asked my friend Doug to help me make a video this week. (Thanks Doug! Check out Doug’s MATLAB Video Tutorials.)

The topic today is the Simulink R2009a feature for Parallel Model Reference builds.   Model reference blocks run in normal (interpreted) mode or accelerated mode.  Simulink has to generate SimTargets for the accelerated reference models during update diagram.  In R2009a you can use the Parallel Computing Toolbox to start a pool of local MATLAB workers and distribute the generation of the SimTargets across the available cores on your system.  Model Reference parallel build also speeds up Real-Time Workshop code generation.  All you need to distribute your build across all the cores on your multi-core machine is to start a local pool of MATLAB workers:

>> matlabpool

Starting matlabpool using the 'local' configuration ... connected to 4 labs.

Watch the video.  Try it out.  Leave a comment below and tell me how it worked.

Updated the video player which was broken on IE.
Files used in this video are available from the File Exchange here

One Response to “Parallel Computing with Simulink: Model Reference Builds”

  1. Dan replied on :

    Very nice video. I liked how you brought up the window task manager performance consistently to demonstrate the workings of the PCT toolbox. Hope to see more great videos like this.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Seth Popinchalk is an Application Engineer for The MathWorks. He writes here about Simulink and other MathWorks tools used in Model-Based Design.
  • Mohamamd: Hi Suth, I try to simulate a load tap-changing transformer in simulink but its control part has to be...
  • Han Geerligs: Hello Guy, thanks for the clarificaton and link. However in the documentation I am missing the...
  • Guy: @Han, you probably already know, but I think it is good to share with everyone. To zoom in use the key...
  • Han Geerligs: Hi Seth, Once again I’d like to point out that my biggest accelerator is using mouse and keyboard...
  • XaL: Hi, thanks for the tips. As someone wrote in http://blogs.mathwor ks.com/seth/2009/03/ 13/new-%C2%A0rele...
  • Uba osy: Hi, in the introductory example for fuzzy logic toolbox it was noted that using non fuzzy means, you could...
  • Prashant: How can I have same example but instead AC(1 to 10V 50 or 60Hz) and DC(0.5 to 10 V) then adding AC+DC but...
  • adrian chavarro: Great tool, for educational and sicentific, simulation. I would like to know where can i place a...
  • Ashish Sadanandan: @wei, I was talking about the case where the compiler would perform the ‘model_Xdim...
  • wei: @Ashish, I agree with your observation on compiler optimization but fail to see why Han’s code would be...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.