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 Comments

What is the error message you see?
Hello Walter,
The error message I am getting is:
"All workers aborted during execution of the parfor loop.
Error in t_script (line 15)
parfor i=1:4
The client lost connection to worker 1. This might be due to network problems, or the interactive communicating job might have errored."
I have a copy of the original working script without any spmd command in it and I was running the simulations in parallel but I have noticed that once matlab gives this error, it cannot even run the original script for parallel computing which was working. For some reason it gets stuck and something changes during the process when this error is received as the same original script runs fine in a different system. I am not making any changes in that script because once I make changes in the script and if this error occurs again then matlab will again get stuck into that error. Can you tell me what might be the reason for this error? I read some related comments on this where people mentioned that it was a software bug in the versions of Matlab before R2014a but I am running it on R2014b.
Thanks. Saqib.
Sorry, I am not familiar with that error.
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
Saqib Hasan on 9 Jan 2017
Edited: Walter Roberson on 9 Jan 2017
Hello Edric,
Thanks for your response. Can you please give me a link for contacting the support team?
Thanks.
Saqib.
That will take you to a page (hosted outside Mathworks) from which you can create a service request.

Sign in to comment.

Answers (0)

Categories

Asked:

on 6 Jan 2017

Commented:

on 9 Jan 2017

Community Treasure Hunt

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

Start Hunting!