Loading Model on Parallel Workers

10 次查看(过去 30 天)
I am trying to run a parsim of my Simulink model, varying the value of a resistor. The script seems to get the stage "Loading Model on Parallel Workers" however does not progress any further. My code is shown below.
model = 'ElectricalModel';
open_system(model,'loadonly');
resistances = linspace(100,110,2);
numSims = length(resistances);
simIn(1:numSims) = Simulink.SimulationInput(model);
for i = 1:numSims
simIn(i) = simIn(i).setBlockParameter([model '/Resistor'],'R',num2str(resistances(i)));
end
out = parsim(simIn, 'ShowProgress', 'on','ShowSimulationManager','on');
The script seems to be stuck in this while loop which is part of the JavaBackedFuture.m file.
while ~predicate(obj) && ~deadlineExpired
millisToWait = min(waitGranularity, iGetMillisRemaining(deadline));
deadlineExpired = (millisToWait == 0);
javaTask.await(millisToWait, millisUnit);
if ~predicate(obj)
iJavaLog(4, 'parallel.Future waiting for ID: %d', obj.ID);
% Ensure wait() is re-entrant by incorporating a drawnow.
drawnow();
end
end
Any suggestions would be greatly appreciated.
  1 个评论
Rahul Kumar
Rahul Kumar 2021-1-11
Hi Rob,
Can you please confirm if your system has enough memory for all the parallel workers? The only thing I can think of is that the system is running low on memory and has started to page the memory which can make processing extremely slow.

请先登录,再进行评论。

回答(0 个)

类别

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

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by