murali yeddanapudi€¦ · rough comparison of simulation modes init just-in-time accelerator mode...
TRANSCRIPT
![Page 1: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/1.jpg)
1© 2017 The MathWorks, Inc.
Speeding up Simulink
Murali Yeddanapudi
![Page 2: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/2.jpg)
2
Agenda
Typical use cases
Accelerator mode
Performance Advisor
Fast Restart and parsim
Incremental workflows
Solver Profiler
![Page 3: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/3.jpg)
3
Agenda
Typical use cases
Accelerator mode
Performance Advisor
Fast Restart and parsim
Incremental workflows
Solver Profiler
![Page 4: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/4.jpg)
4
Edit-Sim-Repeat
Tune-Sim-Repeat
Multi-Sim
Typical simulation use cases
![Page 5: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/5.jpg)
5
Simulate Model
()
View Results
Open Model
Edit Model
Edit-Sim-Repeat
Tune-Sim-Repeat
Multi-Sim
![Page 6: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/6.jpg)
6
Edit-Sim-Repeat
Tune-Sim-Repeat
Multi-Sim
Edit Model
Simulate Model
()View
ResultsOpen Model
Tune Parameters
![Page 7: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/7.jpg)
7
Edit-Sim-Repeat
Tune-Sim-Repeat
Multi-SimLoad Model
sim()
sim()
sim()⁞
Process Simulation
Results
Setup Simulation
Inputs
![Page 8: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/8.jpg)
8
Edit-Sim-Repeat
Tune-Sim-Repeat
Multi-SimLoad Model
sim()
sim()
sim()⁞
Process Simulation
Results
Setup Simulation
Inputs multi sim()
![Page 9: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/9.jpg)
9
Edit-Sim-Repeat
Tune-Sim-Repeat
Multi-Sim
Simulate Model
()
View Results
Open Model
Edit Model
Edit Model
Simulate Model
()View
ResultsOpen Model
Tune Parameters
Load Model
sim()
sim()
sim()⁞
Process Simulation
Results
Setup Simulation
Inputs multi sim()
![Page 10: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/10.jpg)
10
Agenda
Typical use cases
Accelerator mode
Performance Advisor
Fast Restart and parsim
Incremental workflows
Solver Profiler
![Page 11: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/11.jpg)
11
Accelerator Mode
Why would Simulink speed up? JIT compiles (or generates C-code for) portions of the model Running compiled code has less overhead
What’s the tradeoff? There is overhead to generate code Some run time diagnostics are disabled, e.g., inf/nan checking May not speedup all models
Help Search: how acceleration modes work
R2006aIntroduced before
![Page 12: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/12.jpg)
12
Performance Advisor
Why would Simulink speed up? Checks your model for speedup options Validates its own advice, only applies changes that:
give the same answer and improve speed
What’s the tradeoff? Takes time run the analysis Not comprehensive
Trading off fidelity for speed is not part of performance advisor
Help Search: performance advisor
![Page 13: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/13.jpg)
13
accelerator
More Steps
Less Time
normal
rapid accelerator
(jit)
Rough Comparison of Simulation Modes
Init Just-In-Time Accelerator ModeIntroduced in R2016b
Accelerator is faster- Unless your simulations are short
- With JIT, accelerator is faster than normal mode in many more cases
Rapid-accelerator has the least per-step overhead but the most init overhead
![Page 14: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/14.jpg)
14
Questions
![Page 15: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/15.jpg)
15
Agenda
Typical use cases
Accelerator mode
Performance Advisor
Fast Restart and parsim
Incremental workflows
Solver Profiler
![Page 16: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/16.jpg)
16
Fast Restart
Why would Simulink speed up? Avoids recompile between simulation runs Works with Accelerator mode
What’s the tradeoff? Cannot edit the model when in fast restart mode
Help Search: fast restart
![Page 17: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/17.jpg)
17
parsim
Why would Simulink speed up? Runs simulations in parallel using MATLAB
Parallel Computing Parallelization details are automatically handled
if your model works with sim ...… it works with parsim
What’s the tradeoff? Overhead of setting up parallel pool Overhead of starting simulations on the workers Needs scripting in MATLAB
Help Search: parsim
for i = 10000:-1:1in(i) = Simulink.SimulationInput('my_model'); in(i) = in(i).setVariable('my_var', i);
endout = parsim(in);
Desktop Multicore Cluster
![Page 18: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/18.jpg)
18
parsim manages the details of running parallel
simulations
… so you can focus on the design tasks
parsim : Benefits
for i = 10000:-1:1in(i) = Simulink.SimulationInput('my_model'); in(i) = in(i).setVariable('my_var', i);
endout = parsim(in);
Desktop Multicore Cluster
![Page 19: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/19.jpg)
19
parsim: automates book-keeping details (1)
Handles cross platform details– Use parsim from a Windows desktop to run
simulations on Linux Cluster
Handles model dependencies– MATLAB Code, Libraries, S-Functions, …
Integrated with Simulink Cache
Leverages model reference parallel build
![Page 20: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/20.jpg)
20
parsim: automates book-keeping details (2)
Brings back log files from the workers– Appends run id to make them unique
Automatically get references to logged files
![Page 21: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/21.jpg)
21
parsim: automates book-keeping details (3)
Show progress and error diagnostics– Setups up model to run locally to debug
![Page 22: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/22.jpg)
22
Visualizing Results
![Page 23: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/23.jpg)
23
parsim : customization(1)
TransferBaseWorkspaceVariables
outs = parsim(inps, ’TransferBaseWorkspaceVariables’,’on’, …)
UseFastRestart
outs = parsim(inps, ’UseFastRestart’,’on’, …)
![Page 24: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/24.jpg)
24
parsim : customization(2)
SetupFcn
setupFcn = @()addpath(’myProjectDir’)
outs = parsim(inps, ’SetupFcn’,setupFcn, …)
CleanupFcn
cleanupFcn = @()rmpath(’myProjectDir’)
outs = parsim(inps, ’CleanupFcn’,cleanupFcn, …)
![Page 25: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/25.jpg)
25
SimulationOutput object
simOut = sim(’model’, ’ReturnWorkspaceOutputs’,’on’, …)
- Contains all logged simulation data
- Use dot notation to access the data
- Introduced in R2009a
![Page 26: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/26.jpg)
26
SimulationInput object
simOut = sim(simInp)
simOuts = sim(simInps)
simOuts = parsim(simInps)
A SimulationInput object ‘simInp’ encapsulates all input to one simulation
Array of simInps encapsulate all inputs to multiple simulations
* Simulations are run sequentially
Simulations are run in parallel if MATLAB parallelcomputing tools are available, serially otherwise
![Page 27: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/27.jpg)
27
SimulationInput Object
SimulationInput with properties:
ModelName: 'sldemo_suspn_3dof'InitialState: [0x0 Simulink.SimState.ModelSimState]
ExternalInput: []ModelParameters: [1x1 Simulink.Simulation.ModelParameter]BlockParameters: [0x0 Simulink.Simulation.BlockParameter]
Variables: [1x2 Simulink.Simulation.Variable]PreSimFcn: []PostSimFcn: []UserString: ''
Change the Initial StateSpecify a numerical array, timeseries, or Dataset object
as external inputs to the model
Change model or block parametersChange variables in base
workspace, data dictionary, or model
workspace
Specify MATLAB functions to run before and after
each simulation for further customization or post-
processing results Add a brief UserString
describing these changes for easy reference
![Page 28: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/28.jpg)
28
PreSimFcn
Use PreSimFcn to offload parameter computations to parallel workers
for i = 10:-1:1in(i) = Simulink.SimulationInput(i);in(i).PreSimFcn = @(inp) myPreSimFcn(inp, i);
end
function simInp = myPreSimFcn(rawSimInp, runId)prmValue = expensiveComputation(runId);simInp = rawSimInp.setBlockParameter( …
[rawSimInp.ModelName,’/my_block’], ’prmName’, prmValue);end
![Page 29: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/29.jpg)
29
PostSimFcn
use PostSimFcn to post-process raw simulation outputs in parallel reduce data returned back from workers
>> inps = Simulink.SimulationInput(‘myModel’);>> …>> inps.PostSimFcn = @(out) myPostSimFcn(out);>> outs = parsim(inps);>> outs(i).result
function simOut = myPostSimFcn(rawSimOut) simOut.result = expensivePostProc(rawSimOut.lotsOfLogsOut);
end
![Page 30: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/30.jpg)
30
Questions
![Page 31: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/31.jpg)
31
Agenda
Typical use cases
Accelerator mode
Performance Advisor
Fast Restart and parsim
Incremental workflows
Solver Profiler
![Page 32: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/32.jpg)
32
What is an incremental workflow?
Only perform an action when necessary;
reuse and cache as much as possible
![Page 33: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/33.jpg)
33
Model reference: incremental workflows
Incremental Loading
Incremental Update Diagram
Incremental Code Generation
Selective acceleration
![Page 34: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/34.jpg)
34
Model Reference: Performance
0
10
20
30
40
50
60
70
First Simulation Subsequent Simulations
Simulation TimesSubsystems Model Reference
Faster
First time cost
![Page 35: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/35.jpg)
35
How to reduce first time cost?
Parallel Model Reference BuildSimulink Cache
![Page 36: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/36.jpg)
36
Simulink Cache
lift_door.slx lift_door_controller.slx lift_inertia_pm.slx SCADA.slx
SCADA.slxclift_position_controller.slxclift_door.slxc lift_door_controller.slxc lift_inertia_pm.slxc
lift_position_controller.slx
![Page 37: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/37.jpg)
37
Simulink Cache
repackageex
tract
![Page 38: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/38.jpg)
38
Simulink Cache
Sharing build artifacts avoids rebuild
.slxc.slxc.slxc.slxc
![Page 39: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/39.jpg)
39
Simulink Cache
Help Search: simulink cache
Why would Simulink speed up? Sharing build artifacts reduces first time cost Integrated into Simulink Projects and parsim
What’s the tradeoff? Extra work needed to manage .slxc files
If Simulink Projects is not used
![Page 40: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/40.jpg)
40
Parallel Model Reference Builds
![Page 41: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/41.jpg)
41
Parallel Model Reference Builds top
~10 s ~90 s
~10 s~10 s~10 s~80 s~10 s~10 s
![Page 42: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/42.jpg)
42
Parallel Model Reference Builds top
~80 s ~90 s
~10 s~30 s~10 s~10 s~10 s~10 s
![Page 43: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/43.jpg)
43
Model Reference Parallel BuildUser example
Approximately 400 referenced models
4 cores gives ~2.8 speedup
Does adding more cores yield more speedup?
1212.8
3421.8
![Page 44: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/44.jpg)
44
Performance Advisor: Check model reference parallel build
![Page 45: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/45.jpg)
45
Performance Advisor: Check model reference parallel build
Performance Advisor estimates the speedup with more cores
The estimated speed up with 4 cores is ~2.6– Close to the measured value ~2.8
Given ~120 cores, the estimated speed up is ~42=> Build time goes from ~3400s to ~80s
![Page 46: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/46.jpg)
46
Model Reference Parallel Build
Help Search: model reference parallel build
Why would Simulink speed up? Model reference targets are built in parallel
Use Performance Advisor to check if your large models can benefit from this option
What’s the tradeoff? Speedup is model dependent
Requires MATLAB Parallel Computing
![Page 47: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/47.jpg)
47
Questions
![Page 48: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/48.jpg)
48
Agenda
Typical use cases
Accelerator mode
Performance Advisor
Fast Restart and parsim
Incremental workflows
Solver Profiler
![Page 49: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/49.jpg)
49
Solver Profiler
Why would Simulink speed up? Identifies parts of the model causing solver to
slow down too many resets too many zero crossings etc.
What’s the tradeoff? Profiling overhead Requires domain knowledge to optimally fix the
issues identified by the Solver profiler.
Help Search: solver profiler
![Page 50: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/50.jpg)
50
Summary
Normal mode Accelerator mode
Performance Advisor Fast Restart Accelerator + Fast Restart
parsim parsim + Accelerator + Fast Restart parsim + Rapid Accelerator + Up-To-Date-Check-Off
Edit-Sim-Repeat
Tune-Sim-Repeat
Multi-Sim
Use Case Recommended Features
Smart Editing
Model Reference
Simulation Data Inspector
Solver Profiler
![Page 51: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/51.jpg)
51
Editing at the Speed of Thought with SimulinkLearn about the latest smart editing features that have been added to Simulink to increase your modeling speed.
![Page 52: Murali Yeddanapudi€¦ · Rough Comparison of Simulation Modes Init Just-In-Time Accelerator Mode Introduced in R2016b Accelerator is faster - Unless your simulations are short -](https://reader034.vdocuments.net/reader034/viewer/2022042202/5ea21683b82d4040ba0110dc/html5/thumbnails/52.jpg)
52
Thank you