Matlab parfor workers do not return when multiple nested structures are used

1 view (last 30 days)
When I run the following script on a distributed computing server, the workers complete all instructions but then hang rather than finishing. Oddly, this is not an issue if I run on the local cluster. I have also included two variations which work fine even on the distributed computing server.
Any ideas for what could be causing the workers to hang, or what I need to do to fix it?
clear;
input_struct = struct('g1', 2, 'g2', 10);
p = parpool(2);
p.updateAttachedFiles();
results = cell(2, 1);
parfor i_worker = 1:2
% This hangs *after* running, on a distributed computing server -- on local workers, it's fine.
tmp = struct('f1', 2, 'f2', 10);
results{i_worker} = struct('field1', 5, 'field2', struct(tmp), 'field3', struct(input_struct));
%
% But this works:
% tmp = struct('f1', 2, 'f2', 10);
% results{i_worker} = struct('field1', 5, 'field2', struct(tmp));
%
% And this works:
% results{i_worker} = struct('field1', 5, 'field3', struct(input_struct));
%
disp('A worker finished.');
end
disp('Finished all processing.');
delete(p);
Version info:
MATLAB Version: 8.4.0.150421 (R2014b) Operating System: Microsoft Windows 7 Ultimate Version 6.1 (Build 7601: Service Pack 1) Java Version: Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode
MATLAB Version 8.4 (R2014b) Parallel Computing Toolbox Version 6.5 (R2014b) Signal Processing Toolbox Version 6.22 (R2014b) Statistics Toolbox Version 9.1 (R2014b) Symbolic Math Toolbox Version 6.1 (R2014b)
And of course, the distributed computing server has identical version numbers and should be compatible.

Answers (0)

Categories

Find more on MATLAB Parallel Server in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!