Hello!
The reason behind such large memory consumption is that ALGLIB allocates 9000x9000 array for Rep.CX field, where nullspace(A) is stored.
Memory impact is insignificant when function is used in most traditional way (more rows than variables), so this field is always allocated. However, your use case is unusual because you have much more variables than rows. If you want, you may try to solve this issue as follows: * comment out all rows in rmatrixsolvels() which initialize Rep.CX * replace rmatrixsvd(a, nrows, ncols, 1, 2, 2, sv, u, vt) in rmatrixsolvels() by rmatrixsvd(a, nrows, ncols, 1, 1, 1, sv, u, vt)
I have not tested these modifications, but they should work. In case I forgot something, your program should crash with violation of array bounds, so you won't miss it :)
P.S. I added notice to implement compact version of SolveLS(), but it will be done in 3.9.0, because 3.8.0 is in the feature freeze mode (will be released within days from now).
|