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 usage of printing DArrays #2771

Closed
cpcloud opened this issue Apr 5, 2013 · 9 comments
Closed

Memory usage of printing DArrays #2771

cpcloud opened this issue Apr 5, 2013 · 9 comments
Labels
parallelism Parallel or distributed computation performance Must go faster

Comments

@cpcloud
Copy link

cpcloud commented Apr 5, 2013

I was playing around with @parallel doing the comprehension example from the recently posted videos on the Julia blog and I noticed something strange. I happened to have htop running at the time and I noticed that when I evaluated the DArray at the command line (just printing itself), the amount of memory used on my machine would increase by about the number of bytes that the array takes up in memory. Just as a sanity check I tried the same thing with a regular old Array and it works fine.

I then greped the code for "\u22ee" (the vertical dots unicode symbol) to try to find where the issue might lie in show.jl.

The show_vector method of AbstractArrays calls the DArray reshape method which may be making a copy of the chunks making up the darray in darray2.jl on line 188. I have no idea how to go about fixing this.

@quinnj
Copy link
Member

quinnj commented Jun 10, 2014

Sorry this hasn't really been addressed @cpcloud, do you have a code example we can try and reproduce the issue here? There's been a lot of changes in the last year+, so this may not be an issue any more.

@cpcloud
Copy link
Author

cpcloud commented Jun 10, 2014

Hm been a while since I've spun up Julia, let me see if I can come up with something :)

@ViralBShah
Copy link
Member

Cc @amitm

@malmaud
Copy link
Contributor

malmaud commented Oct 14, 2015

Should this issue be closed and moved to https://github.com/JuliaParallel/DistributedArrays.jl, or is it something that needs to be fixed in Base?

@ViralBShah
Copy link
Member

Yes, this should be moved there - and have a specific issue opened here if there is a dependency on fixing something in Base.

@malmaud
Copy link
Contributor

malmaud commented Oct 14, 2015

OK, moved.

@malmaud malmaud closed this as completed Oct 14, 2015
@jakebolewski
Copy link
Member

This uses so much memory because of the way we do array printing in Base. The way we print matrices could be made more efficient.

@jakebolewski jakebolewski reopened this Oct 14, 2015
@jakebolewski
Copy link
Member

It would be useful to see if #13598 helps this situation or not.

@amitmurthy
Copy link
Contributor

DArrays are out of Base now.

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

No branches or pull requests

6 participants