Using parfor and parfeval in separate pools
Ältere Kommentare anzeigen
Is it possible, or even desirable, to make separate pools of workers that total to the number of cores on a system to speed up code processing?
Take the pseudo-code as an example for a 20-physical-core server:
parpool(16)
p = gcp();
parpool(4)
q = gcp()
parfor i = start:last % p
func1(q, i)
end
where
function func1(q, i)
for j = 0:i
parfeval(q,func2(j),...)
end
end
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Parallel Computing Fundamentals finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!