Why doesn't parfeval/ fetchNext work after compilation to .exe?

3 views (last 30 days)
Dear support, i'm trying to create a matlab stand-alone executable containing parfeval statements and a waitbar. The following (example) code runs perfectly within the matlab runtime. However, after compilation using mcc -m test_mcc.m I receive the following error:
error:
Error using parallel.FevalFuture/fetchNext (line 243)
The function evaluation completed with an error.
Error in test_mcc (line 11)
Caused by:
An error occurred interpreting the results of the function evaluation.
parallel:fevalqueue:FetchNextFutureErrored
code:
function test_mcc()
N = 100;
for idx = N:-1:1
% Compute the rank of N magic squares
F(idx) = parfeval(@rank,1,magic(idx));
end
% Build a waitbar to track progress
h = waitbar(0,'Waiting for FevalFutures to complete...');
results = zeros(1,N);
for idx = 1:N
[completedIdx,thisResult] = fetchNext(F);
% store the result
results(completedIdx) = thisResult;
% update waitbar
waitbar(idx/N,h,sprintf('Latest result: %d',thisResult));
end
delete(h)
end
any input?
  1 Comment
Edric Ellis
Edric Ellis on 28 Oct 2015
Hm, I tried that code in R2015b on WIN64, and it worked fine for me. What release of MATLAB/PCT are you using, what platform etc.?

Sign in to comment.

Answers (0)

Categories

Find more on Background Processing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!