How to stop at warning within parfor

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.

 Respuesta aceptada

Edric Ellis
Edric Ellis el 10 de Sept. de 2012

0 votos

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 comentario

Isuri
Isuri el 12 de Sept. de 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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 10 de Sept. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by