MATLAB R2015b crashes on 64 bit Linux. I managed to track the cause of failure to this chunk of code
values = cell(1, nElement);
parfor i = 1:nElement
values{i} = element(i).stiffnessMatrix;
end
where element is an object array and I call the stiffnessMatrix method on all of the objects. In practice nElement is very big. The segfault comes from libtbbmalloc.so.2 (now I know that parfor wraps TBB).
Reading on forums, I preloaded the problematic libraries:
export LD_PRELOAD=/usr/local/MATLAB/R2015b/bin/glnxa64/libtbb.so.2:/usr/local/MATLAB/R2015b/bin/glnxa64/libtbbmalloc.so.2
In vain. The same error persists. It seem that TBB cannot allocate memory (for smaller problem, parfor works). Why does it work for the simple for loop and not for the parfor loop? Just before the program crashed, I saw that I have 11 GB of free memory (more than 4 times more than used by the whole operating system).
I tested it on Windows, and it still fails with the same error. Then I tried with a simple for loop, not a parfor loop on both Linux and Windows. On Linux, the error persists but on Windows the for loop version works.
Thanks in advance.
10 Comments
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_505630
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_505630
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_505993
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_505993
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506100
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506100
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506129
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506129
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506131
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506131
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506134
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506134
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506138
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506138
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506141
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506141
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506172
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506172
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506318
Direct link to this comment
https://ww2.mathworks.cn/matlabcentral/answers/365665-parfor-results-core-dump#comment_506318
Sign in to comment.