ParforProgress class

版本 1.2.0.0 (3.7 KB) 作者: Daniel Golden
Matlab class to track iterations within a parfor loop
362.0 次下载
更新时间 2015/8/17

Class to monitor progress of parfor loop
The parallel workers write to a common file for each iteration and determine the total number of completed iterations by counting the number of lines in the file.

USAGE:

pp = ParforProgress;
parfor kk = 1:100
DO_SOMETHING;
iteration_number = step(pp, kk);
fprintf('Finished iteration %d of %d\n', iteration_number, kk);
end

The numbers may not go exactly in order depending on the order in which the parallel workers finish, but they'll be close enough so you'll get the idea of where you are.

The technique of using a single file to store the iteration information was inspired
by this file exchange utility:

http://www.mathworks.com/matlabcentral/fileexchange/32101-progress-monitor--progress-bar--that-works-with-parfor

引用格式

Daniel Golden (2024). ParforProgress class (https://github.com/dgolden1/ParforProgress), GitHub. 检索时间: .

MATLAB 版本兼容性
创建方式 R2014a
兼容任何版本
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

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

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.2.0.0

Correct description of algorithm

1.0.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库