File Exchange

image thumbnail

matlab-ParforProgress2

version 1.16.0.0 (23.1 KB) by Andreas
A PARFOR progress monitor for Matlab GUIs and the command line (works with normal for-loops)

6 Downloads

Updated 20 Aug 2015

From GitHub

View Version History

View license on GitHub

This progress monitor comes with a nice wrapper `ParforProgressStarter2.m` which will take care of adding the classes to the java class path, depending on whether matlabpool is enabled or not.
For instructions on how to use with global variables, please see https://github.com/kotowicz/matlab-ParforProgress2#c2-with-globals
You can fork the code @ https://github.com/kotowicz/matlab-ParforProgress2

Cite As

Andreas (2021). matlab-ParforProgress2 (https://github.com/kotowicz/matlab-ParforProgress2), GitHub. Retrieved .

Comments and Ratings (22)

raym

Mehmet Seker

is it possible to convert your gui into like this?http://image.prntscr.com/image/6553e7401ef74fc5b11c196b8a78ddec.jpg
ETA: elapsed time
RTA: remaining time

Elizabeth Jones

Seyedfarid Ghahari

Thank you for your great code. I have a slider on my GUI. How can I use your code to update the slider progress in parfor loop?

mauricio castaño

Eduard

Elizabeth Jones

I have been using your parfor progress bar for a couple of years, and it's been working great. I recently upgraded from R2012b to R2014b, and I was so glad to see that you had already updated the progress bar! It made switching all my code to the newest version of Matlab so much easier. Thanks!

Rudi

Andreas, thanks for the update, seems to work. I now have another more difficult question: do you have any idea how I might use your code, or something similar, within a mexed parfor loop (mexed to C++ with OpenMP)? I tried using coder.extrinsic for your functions, but apparently calls to extrinsic functions inside mexed parfor loops are unsupported...

Andreas

@Rudi: please use version 0.2.7 with Matlab 2014a.

Rudi

I have used this great tool for some time but it appears to not work in 2014a with the following error. Works on same exact code in 2013b. Please update, this is the nicest parfor progress meter I have found!

Warning: While loading an object of class 'ParforProgress2': Undefined variable "ParforProgressClient2" or class "ParforProgressClient2.createClient".
Warning: The following error was caught while executing 'ParforProgress2' class destructor:
Attempt to reference field of non-structure array.
Error using ParforProgress2/increment (line 121)
Attempt to reference field of non-structure array.

Hassan Naseri

Hassan Naseri

Nice tool. But it clears my global variables !!

Christophe Trefois

Jerome

@Andreas: Thanks for looking into this.
Are you sure it does not clear globals?
I see that you added a "server_class_loaded" boolean to make sure that javaaddpath is only called once but I discovered the clear global was due to the first call to javaaddpath.
Since you need to do that call, it seems like global will be cleared then, correct?

Andreas

@Jerome: please try the v0.2 release, which should appear shortly here and is also available on github:
https://github.com/kotowicz/matlab-ParforProgress2/archive/v0.2.zip

Jerome

Do you have any idea why this clear all global variables?
Without this waitbar my globals stay fine.

Adam

Does anyone know why this progress monitor would conflict with the Matlab 2013 unit testing framework? I have a test covering a function that uses it - when I create the test instance on its own I can run it fine. When I run it within a test suite though it appears to run fine first time, but then if I run the tests a second time I get a segmentation dump when it tries to build the test suite (this does not happen if I remove the progress monitor). It also seems to work fine when used with the older xUnit framework from Matlab Central.

I like it in general though.

Jens

Bart Boesman

Thanks for this file, works perfect!

Regards,

Bart

Eduard

FYI, I did the changes to ParforProgress2 myself and it actually works perfectly.

Only pit I fell into was compiling the Java code with JDK 7 instead of JDK 6 first, therefore not beeing compatible to MATLAB R20012a's integrated JRE 6.

Eduard

Hi Andreas,

two questions:

1 - Could you add a possibility to "break" the parfor-loop from within ParforProgress2? I was thinking about something quite simple like polling for the existence of a file at the start of the parfor-loop and just "continue" when it exists. The file could be created by ParforProgress2 as soon as the progress window is closed replacing the current warning message (or even add a cancel-button to it).
Probably you can come up with an even better solution yourself!

2 - It would be nice if the output "execution time was XXXs." would only be displayed if do_debug=1, so bascally no output at all is produced when do_debug=0.

Regards
Eduard

Matt Smith

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: PARFOR Progress Monitor

Community Treasure Hunt

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

Start Hunting!