Eig(A'*A) - out of memory. Any shortcuts?

  • Thread starter Thread starter mikeph
  • Start date Start date
  • Tags Tags
    Memory
Click For Summary
SUMMARY

The discussion focuses on optimizing memory usage when calculating the eigenvalues of a large sparse matrix A using MATLAB. Key strategies include utilizing MATLAB's sparse matrix functionality, setting a variable to A'*A before clearing A, and executing MATLAB scripts with the "-nojvm" option to reduce memory overhead. Additionally, participants recommend ensuring the use of a 64-bit operating system and MATLAB version to handle larger datasets effectively.

PREREQUISITES
  • Understanding of MATLAB sparse matrices
  • Familiarity with eigenvalue algorithms
  • Knowledge of memory management in computational tasks
  • Experience with 64-bit operating systems
NEXT STEPS
  • Explore MATLAB's sparse matrix documentation
  • Learn about memory optimization techniques in MATLAB
  • Investigate the "-nojvm" command line option for MATLAB
  • Research best practices for handling large datasets in MATLAB
USEFUL FOR

Data scientists, mathematicians, and engineers working with large sparse matrices in MATLAB, particularly those looking to optimize memory usage during eigenvalue calculations.

mikeph
Messages
1,229
Reaction score
18
A is pretty large (and sparse). I'd really like to be able to calculate this, using less RAM.
 
Physics news on Phys.org
I wouldn't call myself an expert on eigenvalue algorithms, but I had some ideas.

First, you've been using a MatLab http://www.mathworks.com/help/techdoc/ref/sparse.html" matrix for A, right?

Second, you could try setting a variable to A'*A, then clearing A, and then having a call to eig on that variable.

If you're on unix and you don't need the development environment, an option is to run a MatLab script with the "-nojvm" command line option.

Other than that, increase the swap size. If that's not enough, get the following if you aren't already using them for this task:

a 64 bit OS (and computer if needed)

64-bit MatLab
 
Last edited by a moderator:
Thanks for the suggestions
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
12K
Replies
0
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 17 ·
Replies
17
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 46 ·
2
Replies
46
Views
8K
  • · Replies 4 ·
Replies
4
Views
8K
Replies
3
Views
2K