Waitbar in a spmd block in a GUI?

1 回表示 (過去 30 日間)
Ben11
Ben11 2014 年 1 月 28 日
コメント済み: Ben11 2014 年 1 月 29 日
Is there a way to monitor the progress of a calculation inside a spmd block? In the example below I would use a waitbar inside the outermost loop, but they are not allowed in spmd blocks. Any idea on what I could do?
Thanks a lot for your input.
Here is a very simplified version of the code.
spmd
% This is the place where I would initialize a waitbar normally.
for i = 1:A
for k =2:B
%Do stuff
end
% This is the place where I would put the waitbar.eg. waitbar(i/...)
end
end

採用された回答

Edric Ellis
Edric Ellis 2014 年 1 月 29 日
In R2013b, there's the new function PARFEVAL which lets you program the pool workers asynchronously - one of the things this allows is to update graphics such as a progress bar.
You can't use PARFEVAL with the communicating features of SPMD such as labSend and labReceive.
There's an example here using PARFEVAL to use pool workers and display a waitbar.
  1 件のコメント
Ben11
Ben11 2014 年 1 月 29 日
Ok thanks Edric I'll use it when I upgrade for the newest version.

サインインしてコメントする。

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 1 月 28 日
  1 件のコメント
Ben11
Ben11 2014 年 1 月 28 日
Alright thanks anyway.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by