parfor Internal Error: Unexpected initializer in bindings.

1 次查看(过去 30 天)
The code generating this error only does so on one specific machine but works flawlessly on any other computer I try to run it on. I cannot find any documentation on this specific error and "Internal Error: Unexpected initializer in bindings." is the entire output when I try to run the script. Additional details from catching the error show
MException with properties:
identifier: 'MATLAB:cmn_unexpected_initializer_in_bindings'
message: 'Internal Error: Unexpected initializer in bindings.'
cause: {0x1 cell}
stack: [1x1 struct]
The only difference between the computers is processor, all others are various i7's and this machine is a Xeon, and MATLAB 2015b on the others, 2015a on this one. I can't imagine those two differences would cause an error, but I'm at wits end.
Any hints, references to documentation on this error message, or anything would be really helpful.
  1 个评论
Daniel Tweed
Daniel Tweed 2017-2-8
It seems to be related to my use of a try-catch. My code is something like:
errors = 0;
%K,N,S, MAX, etc defined elsewhere
parfor i=1:MAX
p = zeros(K,N);
a = zeros(K,N);
rate = zeros(1,S);
while (true)
try
[ p, a, rate ] = someFunction();
break;
catch ME
errors = errors +1;
end
end
end
Basically, someFunction() could throw an error, then try again. If I leave the catch empty, it works perfectly, and while I don't really need to record how many errors there were, it was useful initially and I did have other lines in there.
Even though it now works for what I need today, I'd still love to know why this error is occurring in case I ever need to do something in the catch.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by