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

Memory of interpolated variables is never freed #214

Closed
mfsch opened this issue May 25, 2021 · 1 comment
Closed

Memory of interpolated variables is never freed #214

mfsch opened this issue May 25, 2021 · 1 comment

Comments

@mfsch
Copy link

mfsch commented May 25, 2021

This might be the intended behavior, but I’ve noticed that when running multiple benchmarks in a loop, the data of the variables that are interpolated into the benchmark accumulates until the system eventually runs out of memory. A simplified demonstration of this behavior:

function bmk()
    a = zeros(128*1024*1024) # 1GB
    b = @benchmarkable $a .+= 1
    run(b)
end

Repeated calls of this function each increase the memory usage of the Julia process by 1GB. My actual usage where I ran into this issue was a bit more complex, where I wanted to measure the performance of some of my functions for different problem sizes, including sizes that take up a major part of the system’s memory.

If this is the intended behavior, would it be possible to document it in the section about interpolated variables? And are there any workarounds other than starting a new Julia process for each problem size?

@vchuravy
Copy link
Member

Duplicate of #127

I think the general feeling is that this is something that needs fixing,
but no one had the time/energy yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants