作者forrester (none)
看板MATLAB
标题笔电下的PARALLEL CODE无法在LINUX运作
时间Sun Sep 23 01:19:02 2012
请教各位先进
我有一个CODE 希望跑5000个LOOP 每个LOOP都很耗时 所以想多核运算
在笔电(双核) R2011b 运作没问题
但拿到学校一个小LAB (有24核) 就没法运作 虽然程式会被执行 但是无论我怎麽
调整参数 回圈数 程式都在九秒就执行完毕 并传回EMPTY CELL给我
我程式如下 (会不会是我findResource()括弧里面是空的呢? 可是我这样又可以
在笔电执行啊)
sim=findResource(); %name for jobmanager
tic
job=createJob(sim, 'FileDependencies',
{'\Users\Forrest\Documents\Thesis\Parallel_Mac'});
cd('/Users/Forrest/Documents/Thesis/Result');
loop_num=2;
rep=1;
for i=1:rep;
jobtask(i)=createTask(job, @simulation_mac, 1, {loop_num}); % indicate that
simu function has 1 output,
end;
submit(job);
waitForState(job, 'finished');
result = getAllOutputArguments(job);
toc;
mse=cell2mat(result);
save parallel_result mse;
destroy(job);
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 192.17.102.181