How to pass data between parfeval
8 ビュー (過去 30 日間)
古いコメントを表示
I'd like to run two jobs on the background using parfeval while I hope they can communicate between each other by passing the data from one job to another. For example, job A generates a data and the job B receives it. How should this work out?
0 件のコメント
採用された回答
Walter Roberson
2017 年 7 月 29 日
Possibly a pollable queue https://www.mathworks.com/help/distcomp/send.html -- but I cannot tell from the documentation whether it only works for parfor or if it works for parfeval as well.
3 件のコメント
Walter Roberson
2017 年 7 月 31 日
If you look at DataQueue and PollableDataQueue https://www.mathworks.com/help/distcomp/parallel.pool.dataqueue.html they say,
"You can construct the queue on the workers and send it back to the client to enable communication in the reverse direction. However, you cannot send a queue from one worker to another. Use spmd, labSend, or labReceive instead."
You would need to use the client as the switchboard for this to work.
For worker-to-worker communications you would need labSend / labReceive. You might also be able to use MPI; see https://www.mathworks.com/matlabcentral/linkexchange/links/840-parallel-programming-with-mpi
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!