Batch jobs of similar data size and function files are taking different times for job completion, though all are started at same time.
古いコメントを表示
I have a large (n x n) data, which is an input for several dependent function files.
Each element should undergo the same process, and the communication between the elements is not necessary.
So I partitioned my data into 'z' number of zones corresponding to number of cores in local machine.
Three columns and two rows.
r_zones = 2; % row zones
c_zones = 3; % column zones
rz = round(linspace(1,sx,r_zones+1)); %rz = row zones
cz = round(linspace(1,sy,c_zones+1)); %cz = column zones
Six jobs are created for six zones with batch command.
pc = parcluster();
for i = 1:r_zones
for j = 1:c_zones
Xa((rz(i):rz(i+1)-1),((cz(j):cz(j+1)-1))) = 1;
job(jm(i,j)) = batch(pc,@com_sigma,3,{inputs});
end
end
for i = 1:r_zones
for j = 1:c_zones
wait(job(jm(i,j)));
end
end
All the jobs have same size of data ( a difference of one row or column may present) and started at the same time.
But, the finishing time of each job is different and the initial job is taking longer time. And, the CPU utilisation is not more than 70%.

採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!