필터 지우기
필터 지우기

parfor question with 40 nodes

조회 수: 2 (최근 30일)
freebil
freebil 2013년 7월 8일
Hello! I have a script which runs in 20 hours
SNR=2:0.25:5
for i=1:length(SNR)
...
for j=1:3000
decodeFUNC(...)
end
end
The decodeFunc code is:
function[..]=decodeFunc(..)
for iters=1:100
for ii=1:10000
...
end
...
for jj=1:5000
....
end
end
I am user of a grid system with 40 nodes with 4 proccesors per node. Which is the most efficient way to use it? I am doing matlabpool 150 and i use parfor to this:
parfor j=1:3000
decodeFUNC(...)
end
Is this correct? With createTask will i have better results? Thanks

답변 (1개)

Edric Ellis
Edric Ellis 2013년 7월 8일
If you manually divide your problem and submit many independent tasks, you will probably see a slight improvement in the amount of cluster time you use. PARFOR automatically tries to perform load-balancing, but inevitably there is some time wasted on the workers. Using lots of independent tasks, each worker will be returned to the cluster immediately once it has finished working on its portion of the problem.
  댓글 수: 2
freebil
freebil 2013년 7월 8일
Thanks for the answer. I have to do 150 tasks?
Edric Ellis
Edric Ellis 2013년 7월 8일
Each task uses only a single processor, so to get your job to run in the minimum amount of time, you need at least as many tasks as you have processors. Precisely how you divide the work depends on how much of the work is not in parallel (i.e. how much work is duplicated - the work that would be done ahead of the PARFOR loop).

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Parallel Server에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by