In the file sparseqr/sparseqr.py, I believe there should be the line
cholmod_free_sparse( chol_A )
added at the end of the definition of the function qr() and
at the end of _solve_with_sparse_rhs() and _solve_with_dense_rhs(), respectively. This should free all the cholmod variables used in those functions after they are not needed any more.
The reason I bring this up is that I was running qr() ~1000 times at a time, and my program would always be aborted without an error message. So I was guessing there must be some memory not being freed up. Adding the above fixed my issue. So hopefully this helps others that have the same problem.
Thank you to the maintainers of this repo for sharing your wrapper to SuiteSparseQR! It has helped me immensely.
In the file sparseqr/sparseqr.py, I believe there should be the line
cholmod_free_sparse( chol_A )
added at the end of the definition of the functionqr()
andat the end of
_solve_with_sparse_rhs()
and_solve_with_dense_rhs()
, respectively. This should free all the cholmod variables used in those functions after they are not needed any more.The reason I bring this up is that I was running
qr()
~1000 times at a time, and my program would always be aborted without an error message. So I was guessing there must be some memory not being freed up. Adding the above fixed my issue. So hopefully this helps others that have the same problem.Thank you to the maintainers of this repo for sharing your wrapper to SuiteSparseQR! It has helped me immensely.