Modified parfor in order to not wait for all iteration to complete ?

9 ビュー (過去 30 日間)
Tuong Nguyen Minh
Tuong Nguyen Minh 2020 年 7 月 15 日
回答済み: Walter Roberson 2020 年 7 月 15 日
Hello everyone
I was running into a proble where I have to run a function that output some data in parallel. I notice that if I was to use the parfor loop then I have to wait for all of the iteration to complete. Is there anyway to modified the parfor loop so that
1/ It will output the result immediately with out having to wait for all concurrent iteration to complete ?
2/ Or it will abandon some iteration and move on if the iteration reach a certain time limit limit. ?
Please help me
Thank you for your enthusiasm !

採用された回答

Walter Roberson
Walter Roberson 2020 年 7 月 15 日
https://www.mathworks.com/help/parallel-computing/parallel.pool.dataqueue.html
for getting back responses.
To terminate an iteration early without its cooperation, use parfeval, and cancel() the future.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by