Registered Member
|
Is there a fixed size above which Eigen will seg fault? I have found a very simply case where a matrix-matrix multiply will cause a seg fault, but I'm not sure if this is a "bug" or if this is me exceeding the intended usage. If it's a bug I'll file it on the tracker.
#include <Eigen/Core> #include <Eigen/Array> #include <iostream> using namespace std; USING_PART_OF_NAMESPACE_EIGEN int main(int argc, char ** argv) { int m = 784; int n = 12800; int p = 1; MatrixXf a(m,n); MatrixXf b(n,p); MatrixXf c(m,p); c = a * b; return 0; } Interestingly enough, if I set n much higher, such as to 25600, it works fine. |
Registered Member
|
I tried your program: here it runs fine.
I don't know where your segfault comes from. There's no maximum size in Eigen, at least not for dynamic-size matrices as you're using. Note that your matrices have uninitialized coefficients, but indeed that shouldn't cause a segfault.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Moderator
|
here it segfault with the 2.0 branch, I'll investigate...
|
Moderator
|
ok, this is what I thought, EIGEN_STACK_ALLOCATION_LIMIT was set to a too large value. So you can workaround by defining :
#define EIGEN_STACK_ALLOCATION_LIMIT 1000000 before including Eigen/Core, or you can fetch the current 2.0 branch using mercurial. |
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]