Problems with Parallel programming (use local cluster, createJob, createTask).
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
Hello. I'm having some confusion regarding the functions createJob and createTask. I had a similar problem as in the topic http://www.mathworks.com/matlabcentral/answers/62944.
By analogy with the problem in the subject, I tried 2 variants (1 task - a few workers, each working on one job). In both cases, large(!) delay time provides by synchronization (wait). I'm not using matlabpool. I hope for your help.
Part of my code:
c = parcluster;
numlabs = c.NumWorkers;
j = createJob (c);
set (j, 'AttachedFiles', {'initialize.m'});
for i = 1:numlabs
j.createTask (@initialize, 3, {divide (i), nd, box});
end
j.submit
j.wait
The initialization function randomly fills the three arrays (testing was done on small and large size of the array). Inputs: divide (i) - integer, nd - integer, box - array (1x2). Maybe there are some bottlenecks in the use of memory locations, I do not know. But the parallel code runs much longer than the sequential calculations.
0 件のコメント
回答 (0 件)
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!