How to stop at warning within parfor

5 views (last 30 days)
My code includes a parfor loop which gives a few warnings while executing. I want to troubleshoot these but couldn't find a way to stop code at warning while saving the parameters.
I have tried dbstop if warning but it does not work within parfor loop.

Accepted Answer

Edric Ellis
Edric Ellis on 10 Sep 2012
You cannot debug code running on matlabpool workers, however you can run your code with matlabpool closed and debug that.
What is the warning you're seeing?
  1 Comment
Isuri
Isuri on 12 Sep 2012
Thanks Edric. Is there a way to access variables within a parfor loop when debugging this way?
the warning I get is
Warning: Removing NaN and Inf from data
> In curvefit\private\prepareFittingData>iEnsureFinite at 102
In curvefit\private\prepareFittingData at 38
In prepareCurveData at 41
In createFit_dw at 18
In parallel_function at 479
In dw_parallel at 38

Sign in to comment.

More Answers (0)

Categories

Find more on Parallel for-Loops (parfor) in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!