Parallel Computing Got Error Unexpected Standard exception from MEX file what () is: bad allocation
Show older comments
I have 12 workers on my parallel pool. Here is my code 'ptest.m':
M = 30;
accuracy = zeros(1,M);
parfor i = 1:M
TreeStruct = TreeBagger(100,train_data,train_label);
test_label_predict = str2num(cell2mat(predict(B,test_data)));
accuracy(i) = sum(test_label_predict == test_label)/length(test_label)*100;
end
then I ran it with
job = batch('ptest','Pool',10);
I got an error from workers:
Unexpected Standard exception from MEX file.
What() is:bad allocation
I change M = 10, it works.
for M = 3 * No.Workers, this works from 1 to 7 (No.Workers).
If I change the No.Trees to 50 in TreeBagger function, it also works.
Does this mean that workers have some limited memory or what?
And how can I fix this problem?
Thanks in Advance~!
Answers (0)
Categories
Find more on Perform Sensitivity Analysis 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!