parallel computing issue (R2014b)
이전 댓글 표시
Hello,
I was running matlab parallel computing and it was working fine but after few days it stopped running and gave me same errors as reported above. I tried a bunch of different things but nothing worked out. My code is as follows:
%%Load the model
load_system('fourteenbus_DR_OR_c1');
parpool;
simout = cell(1,4);
tic
spmd
% Setup tempdir and cd into it
currDir = pwd;
addpath(currDir);
tmpDir = tempname;
mkdir(tmpDir);
cd(tmpDir);
% Load the model on the worker
load_system('fourteenbus_DR_OR_c1');
end
parfor i=1:4
load_system('fourteenbus_DR_OR_c1');
set_param(['fourteenbus_DR_OR_c1/DR_Protection_System1/PA_BR' num2str(i)],'tsc','.5');
% disp(['executed A' num2str(i)])
set_param(['fourteenbus_DR_OR_c1/OR_Protection_System1/PA_BR' num2str(i)],'tsc','.5');
% disp(['executed C' num2str(i)]) set_param(['fourteenbus_DR_OR_c1/Fault_' num2str(i)],'SwitchTimes','.5'); % disp(['fourteenbus_DR_OR_c1/Fault_' num2str(i)]) % disp(['executed B' num2str(i)]) sim('fourteenbus_DR_OR_c1'); end delete(gcp); toc
I noticed that when I comment out the line
set_param(['fourteenbus_DR_OR_c1/Fault_' num2str(i)],'SwitchTimes','.5');
the code runs fine in parallel but I cannot understand why it is doing that because it is just a set_param command like the above commands in the script. Can you please tell me how to solve this issue?
Thanks. Saqib.
댓글 수: 6
Walter Roberson
2017년 1월 6일
What is the error message you see?
Saqib Hasan
2017년 1월 7일
Walter Roberson
2017년 1월 8일
Sorry, I am not familiar with that error.
Edric Ellis
2017년 1월 9일
That error indicates that the workers crashed during execution of the parfor loop. I don't know why the workers would crash though... I suggest you might wish to contact MathWorks support to see if they can help you work out why your workers are crashing in this case.
Saqib Hasan
2017년 1월 9일
편집: Walter Roberson
2017년 1월 9일
Walter Roberson
2017년 1월 9일
That will take you to a page (hosted outside Mathworks) from which you can create a service request.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!