How to check for number of vacant workers available in a parallel pool?

조회 수: 9(최근 30일)
Viswanath Hariharan
Viswanath Hariharan 2017년 11월 7일
댓글: Viswanath Hariharan 2017년 11월 7일
I have a branch and bound algorithm that needs to be executed in parallel. The main 'if' condition that I need to implement requires me to have the number of vacant workers available in the parallel pool. Numlabs returns total number of workers in the pool. But how to obtain the number of vacant workers available in the pool in both parfor and spmd blocks?
  댓글 수: 2
Viswanath Hariharan
Viswanath Hariharan 2017년 11월 7일
Let's say I have 100 workers to use. I send problems in batches of 4 to be solved. The condition will be that if there are at least 4 workers available, I'll send the next batch of 4. Else I'll wait. What do you think I should be using to accomplish this?

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

답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by