i'm trying to create a matlab stand-alone executable containing parfeval statements and a waitbar. The following 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 clues?