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

pmap memory leak #10818

Closed
denizyuret opened this issue Apr 14, 2015 · 2 comments
Closed

pmap memory leak #10818

denizyuret opened this issue Apr 14, 2015 · 2 comments
Labels
parallelism Parallel or distributed computation

Comments

@denizyuret
Copy link
Contributor

The code below leaks in Version 0.3.7 (2015-03-23 21:36 UTC) and Version 0.4.0-dev+3718 (2015-03-07 21:17 UTC). gc() does not seem to help. Replacing pmap with map stops the leak.

function main()
    for epoch=1:100
        @show epoch
        a = helper()
        @everywhere gc()
        @everywhere println(Base.PGRP.refs)
    end
end

function helper()
    @time p = pmap(workers()) do w
        x = rand(Float32, 1<<10, 1<<15)
    end
    return 0
end

main()
@ViralBShah ViralBShah added the parallelism Parallel or distributed computation label Apr 14, 2015
@timholy
Copy link
Member

timholy commented Apr 14, 2015

#3934, #8912, #6597

@amitmurthy
Copy link
Contributor

Thanks to @vtjnash 's fix 3bbc5fc

memory usage reaches a steady high state quite soon and does not keep growing when tested with the following code (julia -p 2):

function main()
    for epoch=1:100
        @show epoch
        a = helper()
        @everywhere gc()
    end
end

function helper()
    @time p = pmap(workers()) do w
        x = ones(10^8)
    end
    return 0
end

main()

The resident memory (after 100 loops) for the master is around 4.5G and for the workers around 800 MB each. That is probably a different issue.

Closing this issue.

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

No branches or pull requests

4 participants