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 leak with arrays in conjuciton with HDF5 #537

Closed
fremling opened this issue Nov 19, 2018 · 2 comments
Closed

Memory leak with arrays in conjuciton with HDF5 #537

fremling opened this issue Nov 19, 2018 · 2 comments

Comments

@fremling
Copy link

I'm quite new to julia, but i've noticed that there seems to be a memory leak in the HDF5 package in julia version 1.0.2 with the "HDF5" package is 0.10.2.

If i run the following code (Ubuntu 18.04)

using HDF5
using LinearAlgebra
function HDF5MemoryLeak1(Num)
    MyArray=randn(1000,100)
    fid=h5open("testfile.hdf5","w")
    close(fid)
end
function HDF5MemoryLeak2(Num)
    #MyArray=randn(1000,100)
    fid=h5open("testfile.hdf5","w")
    close(fid)
end
function HDF5MemoryLeak3(Num)
    MyArray=randn(1000,100)
    #fid=h5open("testfile.hdf5","w")
    #close(fid)
end
function HDF5MemoryLeak4(Num)
    NyMarray=randn(1000,100)
    NyMarray=nothing
    fid=h5open("testfile.hdf5","w")
    close(fid)
end


N=2*10^3
for j in 1:N
    println("$j of $N")
    HDF5MemoryLeak(j)
end

If i run this file and replace in the loops HDF5MemoryLeak by HDF5MemoryLeak1, HDF5MemoryLeak2 or HDF5MemoryLeak3 i get the following reads on top

<Call_Name>         VIRT      RES    SHR 
HDF5MemoryLeak1 12332192   1.683g  80252
HDF5MemoryLeak2   802256   235908  79020
HDF5MemoryLeak3   810720   242440  79500
HDF5MemoryLeak4    2532724 1.720g 106868

So it looks like one their own, the hdf5 module and the linear algebra package to not leak memory, but together they do?

Ive seen this discussion #349 on memory leaks, but i'm not sure this is the same issue.

@ludvigak
Copy link

I believe I'm seeing the same thing (just posted in #349).

@musm
Copy link
Member

musm commented Aug 4, 2020

closed by #629 thanks to @MarkusSchildhauer !

@musm musm closed this as completed Aug 4, 2020
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

3 participants