Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference cycle in scipy.sparse.linalg.eigs with shift-invert mode #3362

Closed
lorenzovitale opened this issue Feb 21, 2014 · 3 comments
Closed

Comments

@lorenzovitale
Copy link

Hi,
I think I found a memory leak in scipy.sparse.linalg.eigs using shift-invert mode (setting the parameter sigma). I wrote a sample code:
https://gist.github.com/anonymous/9132942
The software versions and OS I am using are the following: Numpy 1.7.1, Scipy 0.12.1, Python 2.7, Fedora 18

@pv
Copy link
Member

pv commented Feb 21, 2014

This does not seem to be a memory leak, but there does seem to be a reference cycle.
Add import gc; gc.collect() to the loop.

Python does run the gc also automatically, but not as often.

@lorenzovitale
Copy link
Author

This solves the problem, at least for me. Thanks

@ev-br
Copy link
Member

ev-br commented Sep 9, 2014

fixed in gh-3968, closing

@ev-br ev-br closed this as completed Sep 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants