Out of memory because of allocation on stack
Toeplitz opened this issue · comments
It seems the code does not work for medium sized or large problems. In my case I tried with a VAR_SIZE of 531 and I get the following:
error: static assertion failed: OBJECT_ALLOCATED_ON_STACK_IS_TOO_BIG
Setting EIGEN_STACK_ALLOCATION_LIMIT 0
resolves this, but then the code simply crashes.
We should probably look at a alternative version without using allocations on the stack? Do you think this would take much work?
Hi @Toeplitz thanks for pointing it out.
I recently merged a some changes where the fixed size types are replaced by Eigen::Dynamic
types, which should solve this issue.
You can have a look at the unit tests for example usage: sqp_test.cpp and sqp_test_autodiff.cpp
Thank you. I will have a look now to try it out!