Thread Subject: parallel processing - parfor - progress monitor

Subject: parallel processing - parfor - progress monitor

From: Omni Domni

Date: 4 Jan, 2010 00:05:04

Message: 1 of 2

As far as I've seen in the forums there doesn't seem a way to monitor the progress of a par for loop (that is how many iterations have executed). Since the simulations I run take a couple of hours this would be quite useful.

Is there any other computationally effective way to implement a 'parfor' loop, using other commands of the parallel processing toolbox, that enable some kind of callback to be executed when a worker has finished a single iteration?

Subject: parallel processing - parfor - progress monitor

From: Edric M Ellis

Date: 4 Jan, 2010 08:20:34

Message: 2 of 2

"Omni Domni" <eloykarakh@hotmail.com> writes:

> As far as I've seen in the forums there doesn't seem a way to monitor the
> progress of a par for loop (that is how many iterations have executed). Since
> the simulations I run take a couple of hours this would be quite useful.

I wrote a fairly crude parfor progress monitor, but it doesn't allow arbitrary
callbacks (that's not feasible with the way parfor works):

http://www.mathworks.com/matlabcentral/fileexchange/24594-parfor-progress-monitor

> Is there any other computationally effective way to implement a 'parfor' loop,
> using other commands of the parallel processing toolbox, that enable some kind
> of callback to be executed when a worker has finished a single iteration?

Jobs and tasks are likely to be less computationally efficient than a parfor
loop since they cannot do dynamic load balancing. Also, each task invocation has
more overhead than a parfor loop iteration. However, they may give you more
flexibility to perform arbitrary MATLAB stuff as each task completes. If you're
using the jobmanager, there are various callbacks you can use to help;
otherwise, you'd need to poll the task state.

Cheers,

Edric.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com