フィルターのクリア

Pre-initialise parallel pool

10 ビュー (過去 30 日間)
Stewart Tan
Stewart Tan 2019 年 9 月 23 日
コメント済み: Stewart Tan 2019 年 9 月 25 日
So I’m using Matlab’s parfor for performing feature extraction. However, I find that every time when the code is ran for the first time, the parallel pool needs to be prepared (gathering workers) and it takes quite some time for it to be ready. I was wondering if it is possible to pre-initialise the parallel pool before running the parfor loop?
  4 件のコメント
Adam
Adam 2019 年 9 月 24 日
So yes, calling parpool should do this. There are also settings in your preferences that you may wish to change. I can't remember what defaults are, but I think they are the opposite to what I use.
One is to automatically create a parallel pool if it isn't open, when a parfor is executed (I have this unticked, but I'm pretty sure default is ticked otherwise it would confuse people!). The other is the shut down for the parallel pool when it has been idle for a certain amount of time. I have this unticked too as I prefer to open and close my own parallel pool.
Stewart Tan
Stewart Tan 2019 年 9 月 25 日
@Adam thank you. It works.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeParallel Computing Fundamentals についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by