Out of memory error when working with small matrices
Show older comments
Calling
S = [[4,1];[1,4]]; eig(S)
Gives an out of memory error in Matlab R2020a on my Ubuntu 18.04 machine with 16GB RAM. ulimit returns "unlimited".
Calling
S = [[4,1];[1,4]]; [L,flag] = chol(S)
Gives the following error: "Error using chol. Requested 140466905415679x140466905415679 (17179869184.0GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive."
Any clue?
2 Comments
Christine Tobler
on 15 Apr 2020
Something's going very wrong there. Are you getting similar problems when you're using functions that are not part of linear algebra (for example S.*S or sum(S))?
If not, could you call "version -lapack" and "version -blas" and tell us the results?
Makrushka
on 15 Apr 2020
Accepted Answer
More Answers (2)
Steven Lord
on 15 Apr 2020
Can you confirm that you haven't created or downloaded your own eig.m and chol.m that's taking precedent over the built-in eig and chol functions? The output of these two function calls should show this information.
which -all eig
which -all chol
Can you show the full and exact text that is displayed in the Command Window when this error occurs? Include all the red and orange text displayed. Copy it verbatim from the Command Window and paste into a comment.
1 Comment
Makrushka
on 15 Apr 2020
Categories
Find more on C Shared Library Integration 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!