Problem working with parfor
12 ビュー (過去 30 日間)
古いコメントを表示
Dear all,
I am working with the parallel tool in order to optimize the run time of my simulations. I am using a resevoir simulator (MATLAB Reservoir Simulation Toolbox). I am adding a function after each time convergence, to do a parallel calculations on each cell. However, it seems there is a problem with the parallel tool. It stuck in a cetrain function as found in the attached image.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1671811/image.png)
The code stucks here does not proceed anymore. Do you have any idea why it is happening?
0 件のコメント
採用された回答
Edric Ellis
2024 年 4 月 18 日
That stack frame in the profiler is simply where your MATLAB client is waiting for the workers to complete their work. You can get profiling information from the workers using mpiprofile.
3 件のコメント
Edric Ellis
2024 年 4 月 18 日
That means the workers are still working on your loop. The simplest way to check that things are still proceeding on the workers is to add a disp statement to the body of your parfor loop to see where things are getting to.
その他の回答 (0 件)
参考
カテゴリ
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!