How to shut down all running workers of paarpools?
34 ビュー (過去 30 日間)
古いコメントを表示
How can I find and shut down all workers of all parpools that might currently be running?
During debugging I frequently run into crashes and out of memory errors. Often, some worker processes keep running and I would like to know, how to best close all of them, before starting another script.
0 件のコメント
採用された回答
Edric Ellis
2023 年 3 月 7 日
You can shut down all remaining workers of the currently running pool by executing:
delete(gcp('nocreate'))
There should be no running workers other than in the current pool.
1 件のコメント
Davy Figaro
2024 年 5 月 16 日
This shuts down the current parallel pool (created with parpool). How can I stop and clear all the workers without shutting down the pool?
その他の回答 (2 件)
Raymond Norris
2023 年 3 月 6 日
Hi @Felix. If even if a single worker crashes, all workers will terminate. Can you elaborate a bit more on a couple of things
- Are you using a local pool or a cluster? If cluster, MJS or your own scheduler (and if so, which)?
- Which parallel constructs are you using (parfor, parfeval, etc.)? Can you give a simple example of what might crash. Not interested in the details (I'm sure the worker(s) are crashing), more interested in how your running the code.
1 件のコメント
Edric Ellis
2023 年 3 月 7 日
Note that on "local" and MJS clusters, the parallel pool will not necessarily immediately terminate when a single worker crashes. On those clusters, pools that have not yet used spmd can survive losing workers.
Felix
2023 年 3 月 8 日
1 件のコメント
Raymond Norris
2023 年 3 月 14 日
I'm confused how the crash dump files and preserverd jobs how up too much memory. Do you mean disk space?
If a job is running, I'm not sure there would be a crash dump file (untill the end). And do you want to delete the crash file or the job? If you're running a parallel pool and the pool crashes, there's no job to delete.
参考
カテゴリ
Help Center および File Exchange で Parallel Computing Fundamentals についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!