Problem working with parfor

조회 수: 13 (최근 30일)
Ahmadreza
Ahmadreza 2024년 4월 17일
댓글: Ahmadreza 2024년 4월 18일
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.
The code stucks here does not proceed anymore. Do you have any idea why it is happening?

채택된 답변

Edric Ellis
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
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.
Ahmadreza
Ahmadreza 2024년 4월 18일
Thanks for your help. As a matter of fact you are right. There was a problem inside the third party software that I fixed it. I MUST NEVER LOSE MY FAITH IN MATLAB!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by