MATLAB Answers

Mr M.

How to follow progress of a parfor-loop?

Asked by Mr M.
on 18 Dec 2017
Latest activity Commented on by Walter Roberson
on 25 Jul 2018
Accepted Answer by Jan
I would like to follow the run on a progress bar of a cycle. In case of simple for-loop is easy, but whatif I use parfor?

  1 Comment

on 18 Dec 2017
What do you mean by a cycle? If you mean the loop that is actually parallel then a progress bar will not work with this, although there are some on File Exchange that will, though only really if there are sufficiently more iterations than there are cores.
is the one I use for this purpose, though it does lead to a load of warnings in scenarios where previous objects of the class are not properly deleted.

Sign in to comment.


2 Answers

Answer by Jan
on 18 Dec 2017
 Accepted Answer

Adam has given one example already: Take a look into the FileExchange. You find many corresponding solution if you search for "parfor":


Sign in to comment.

Answer by Stuart McGarrity on 25 Jul 2018
Edited by Stuart McGarrity on 25 Jul 2018

You can implement this with a data queue. See a waitbar example here:

  1 Comment

Sign in to comment.