Parallel Toolbox: some doubts

2 次查看(过去 30 天)
mklcst mklcst
mklcst mklcst 2012-3-2
Hi everybody, I'm starting to use parallel computing in Matlab in order to speed up my computation. First I want optimize my code with parallel computation and then I will integrate the use of GPU. I have some methodological questions: 1) What is the optimal number of workers/labs to set? I have an Asus K53sv, Intel Core i7 2630QM / 2 GHz and 8gb ram. I red that by default the labs are set to the number of processor cores, in my case 4. What do you suggest me? To keep it set for four or increase to an x number?
2) I have a code to run that is composed by different loops of bootstrapping, optimization on a financial dataset. I put the parfor in the for loop of lower level. In this loop then I call a fminsearch, in order to speed up the computation I changed to patternsearch by allowing for parallel in the option. But, I don't see an increase of speed compare to fminsearch: this is because I "use" all the cores in parfor? If yes, how can I fix it?
Thank you very much for your support and your help. Mike

回答(2 个)

Titus Edelhofer
Titus Edelhofer 2012-3-2
Hi,
regarding 1): The default is usually indeed a good default: adding more workers usually only compete against each others for resources (including in the end memory). There are as always exceptions.
regarding 2): It makes no sense to combine both. Either use patternsearch and allow the use of parallel execution or parallelize the loop using parfor.
Titus

mklcst mklcst
mklcst mklcst 2012-3-2
2) ok, there is an other way to speed up fminsearch?

类别

Help CenterFile Exchange 中查找有关 Direct Search 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by