Question

I am working on large scale data like 300000 x 300000 matrix currently may interest. It is really hard to process in matlab due to "Out of memory" error so I decide to use EIGEN. Is there any restriciton for eigen in the matrix size?

Was it helpful?

Solution

The dense matrices in EIGEN are stored in a contiguous block of memory, which cannot exceed 2 GB in 32-bit application, so if you're running a 32-bit application, the allocation will start to crash for matrices half this size, that is to say around 10,000x10,000. See for example this duplicated question.

The same issue will happen with other libraries, since you're bounded by your RAM, not by the library.

Yet, if your big matrix has a vast majority of 0 in it, you can resort to SparseMatrix.

If your matrix isn't sparse, then you may store it on disk, but you'll get terrible performance when manipulating it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top