Parallel computing (parsim) run out of memory during Simulink simulation
3 views (last 30 days)
Show older comments
When I simulate my Simulink model memory (RAM) fully occupied by Parallel Toolbox. I tryed delete Cluste, but it didn't help. First simulation work good, but next simulation take all free memory.
What I should do for solving this?
% 3) Create an array of SimulationInput objects and specify
% the values for each simulation
simIn(1:numSims) = Simulink.SimulationInput(model);
for idx = 1:numSims
simIn(idx) = simIn(idx).setBlockParameter(...
[model '/Motor hip aa fr/Control/Position controller'],'P',num2str(Kpp_table(idx)), ...
[model '/Motor hip aa fr/Control/Position controller'],'D',num2str(Kdp_table(idx)), ...
[model '/Motor hip aa fr/Control/Position controller'],'I',num2str(Kip_table(idx)),...
[model '/Motor hip aa fr/Control/Speed controller'],'P',num2str(Kpw_table(idx)), ...
[model '/Motor hip aa fr/Control/Speed controller'],'D',num2str(Kdw_table(idx)), ...
[model '/Motor hip aa fr/Control/Speed controller'],'I',num2str(Kiw_table(idx)),...
[model '/Motor hip aa fr/Control/BLDC Current Controller'],'Kp',num2str(Kpi_table(idx)), ...
[model '/Motor hip aa fr/Control/BLDC Current Controller'],'Kaw',num2str(Kdi_table(idx)), ...
[model '/Motor hip aa fr/Control/BLDC Current Controller'],'Ki',num2str(Kii_table(idx)) );
end
simOut = parsim(simIn,'TransferBaseWorkspaceVariables','on');
myCluster = parcluster('local');
delete(myCluster.Jobs)
f1=[];
for idx = 1:numSims
y = simOut(1, idx).simout.y;
f_compute_9opt_parallel
f1(idx)=f;
end
0 Comments
Answers (0)
See Also
Categories
Find more on Motor Drives in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!