★ wanayoo — archive 1999 https://github.com/oxfordcontrol/qdldl-python/pull/7Nouvelle recherche | Portail wanayoo
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

Removed memory leak #7

Merged
merged 1 commit into from May 11, 2020
Merged

Removed memory leak #7

merged 1 commit into from May 11, 2020

Conversation

@bstellato
Copy link
Member

@bstellato bstellato commented May 11, 2020

Fixes #5. The script

import scipy.sparse as sp
import numpy as np
import qdldl as ldl

N = int(1e4)
runs = int(1e5)

A = sp.eye(N, format='csc', dtype='float64')
b = np.random.randn(N)

F = ldl.Solver(A)
# memory usage is fine up to this point

# memory usage goes through the roof with many repeated solves
for i in range(runs):
    F.solve(b)

was causing a memory leak.

From memory_profiler:
mem_leak

after this PR:

no_mem_leak

@bstellato bstellato merged commit f9d04ff into master May 11, 2020
6 checks passed
6 checks passed
Build wheel on ubuntu-latest
Details
Build wheel on ubuntu-latest
Details
Build wheel on macos-latest
Details
Build wheel on macos-latest
Details
Build wheel on windows-latest
Details
Build wheel on windows-latest
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

1 participant
You can’t perform that action at this time.