フィルターのクリア

Parallel Computing for One Simulation

1 回表示 (過去 30 日間)
Ahmet Hakan Albayrak
Ahmet Hakan Albayrak 2023 年 6 月 22 日
コメント済み: Walter Roberson 2023 年 6 月 26 日
Hello everyone,
I have tried to use Parallel Computing Toolbox to overcome the negative effect of simulation run time. The model I am working with is complex, it has lot of subsystems and nested parts. My aim is to speed up this model with parallel computing toolbox and parallel server. I can run parallel simulations with computer clusters with the help of these toolboxes but is there any way I can speed up my simulation by using all of my cores into 1 simulation? Not parallel simulations or Monte Carlo analysis more specifaclly. Hope I can make my point.

回答 (2 件)

Mudit Kumar Bhugari
Mudit Kumar Bhugari 2023 年 6 月 22 日
According to my understanding, you want to speed up your simulation of your model which is very complex. I would recommend you using Background Processing. With the help of Background Processing, you can run some of your functions in Background and rest in Foreground to pace up your simulations.
You can read Background Processing in detail from this documentation -
Note - You can not pass System Objects in background as System Objects are not supported to work in Thread Based Environment. If you have Sysyem Objects in your code, you need to convert them to functions and then pass to background.
Hope this helps
  2 件のコメント
Walter Roberson
Walter Roberson 2023 年 6 月 22 日
I believe that the question is about Simulink models, so I do not think that your suggestions will work for that purpose
Ahmet Hakan Albayrak
Ahmet Hakan Albayrak 2023 年 6 月 26 日
Thanks for the answer first of all. And yes it was for Simulink models, on Matlab I only have initialization functions & databases, nothing more.

サインインしてコメントする。


Raymond Norris
Raymond Norris 2023 年 6 月 22 日
This is a bit tough to answer without seeing a bit of the code. For starters, your code might already be using most (all) of your cores with implicit threading, for example
y = fft(x);
Where's the bottleneck in your code? For example
x = imread('file');
or
for idx = 1:N
% do stuff
end
If it's the former, maybe you only need to read in a portion of the data. If it's the later, maybe you scatter the interations across cores.
  3 件のコメント
Ahmet Hakan Albayrak
Ahmet Hakan Albayrak 2023 年 6 月 26 日
So only option I have is to run parallel of some subsystems maybe??

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by