When remotes crash, loop for all slaves before stopping
parent
50cdcfb037
commit
5c92543036
|
@ -502,6 +502,7 @@ dynareParallelGetFiles([fname,'_output_*.mat'],PRCDir,Parallel(1:totSlaves));
|
||||||
|
|
||||||
|
|
||||||
% Create return value.
|
% Create return value.
|
||||||
|
iscrash = 0;
|
||||||
for j=1:totCPU,
|
for j=1:totCPU,
|
||||||
load([fname,'_output_',int2str(j),'.mat'],'fOutputVar');
|
load([fname,'_output_',int2str(j),'.mat'],'fOutputVar');
|
||||||
delete([fname,'_output_',int2str(j),'.mat']);
|
delete([fname,'_output_',int2str(j),'.mat']);
|
||||||
|
@ -510,11 +511,17 @@ for j=1:totCPU,
|
||||||
end
|
end
|
||||||
if isfield(fOutputVar,'error'),
|
if isfield(fOutputVar,'error'),
|
||||||
disp(['Job number ',int2str(j),'crashed with error:']);
|
disp(['Job number ',int2str(j),'crashed with error:']);
|
||||||
error([fOutputVar.error.message]);
|
iscrash=1;
|
||||||
|
keyboard;
|
||||||
|
disp([fOutputVar.error.message]);
|
||||||
|
else
|
||||||
|
fOutVar(j)=fOutputVar;
|
||||||
end
|
end
|
||||||
fOutVar(j)=fOutputVar;
|
|
||||||
end
|
end
|
||||||
|
if iscrash,
|
||||||
|
error('Remote jobs crashed');
|
||||||
|
end
|
||||||
|
|
||||||
pause(1), % wait for all remote diary off completed
|
pause(1), % wait for all remote diary off completed
|
||||||
|
|
||||||
% Cleanup. (Only if the computing is executed remotly).
|
% Cleanup. (Only if the computing is executed remotly).
|
||||||
|
|
Loading…
Reference in New Issue