So, I'm finding the Eigen package crashes when I try to declare a matrix larger than 10000x10000. I need to declare a matrix like this.. about 13000x13000 elements reliably. I ran a test like:
for( int tortureEigen = 1 ; tortureEigen < 50000 ; tortureEigen++ )
{
printf( "Torturing Eigen with %dx%d..\n", tortureEigen, tortureEigen ) ;
Eigen::MatrixXd m( tortureEigen, tortureEigen ) ;
}
Crashes on my machine (6 GB RAM) at 14008 elements.
I'm kind of disappointed! I thought Eigen was like MATLAB or octave and should not crash using larger arrays, even if it does hit the disk or something..
And what's more is when I run this test and keep TaskMan open, the process that is creating these matrices doesn't even use that much memory. TaskMan reports under 2k usage.
Using Eigen 2.0.15 stable release
eigen developer here. You'd be far better off asking Eigen questions on our support channels e.g. forum... ;-)
Short answer: are you using fixed or dynamic-size matrices?
if fixed-size, switch to dynamic-size (for such huge sizes, it's a no-brainer anyway)
if you're getting the bug with dynamic-sized matrices, I'm suprised but at the same time I can see where the value 10000 comes from. In any case, if you upgrade to eigen3 (the development branch), your problem will be gone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With