How to control number of threads in FFT ?
9 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I want to vary the number of threads active in fft/fftn. I test on R2011b:
A = randn([2048 2048]);
maxNumCompThreads(N)
for a=1:100
A = fftn(A);
end
with different N. However, when varying N, nothing change in the core CPU monitoring: all the cores stay active.
It seems that the fftw library does not take into account the number of cores. Is there a way to specify this parameter in fftw ? Is there another way to define the number of active cores ?
Thank you.
0 件のコメント
回答 (2 件)
Geoff
2012 年 4 月 11 日
Don't know if this is any help, but:
maxNumCompThreads will be removed in a future release. Please remove
any instances of this function from your code.
Function was removed in 2012a:
It's possible that it was being systematically removed from functions such as fftn() prior to that release (?)
Richard Brown
2012 年 4 月 11 日
I just tried it out on my Windows install (R2011b). No matter what you set maxNumCompThreads to, fftn only ever uses one thread. It's simply not multithreaded.
edit: Something funky was happening with my system when I tested this -- it is multithreaded.
5 件のコメント
Richard Brown
2012 年 4 月 11 日
Well, after a reboot, it is multithreading properly. Something must have been amiss. It simply IS multithreaded
参考
カテゴリ
Help Center および File Exchange で Platform and License についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!