parallel computing issue (R2014b)
Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 6 Jan 2017
What is the error message you see?
Saqib Hasan
le 7 Jan 2017
Walter Roberson
le 8 Jan 2017
Sorry, I am not familiar with that error.
Edric Ellis
le 9 Jan 2017
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
le 9 Jan 2017
Modifié(e) : Walter Roberson
le 9 Jan 2017
Walter Roberson
le 9 Jan 2017
That will take you to a page (hosted outside Mathworks) from which you can create a service request.
Réponses (0)
Catégories
En savoir plus sur Parallel Computing Fundamentals dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!