Improve Documentation on SharedArrays #13922 Closed ahwillia opened this Issue on Nov 8, 2015 · 1 comment Projects None yet Labels doc parallel Milestone No milestone Assignees No one assigned 4 participants @ahwillia @timholy @tkelman @kshyatt Notifications You’re not receiving notifications from this thread. @ahwillia ahwillia commented on Nov 8, 2015 Caveat -- I'm new to using the parallel tools in Julia, but I think this section of the documentation could use some love: http://julia.readthedocs.org/en/latest/manual/parallel-computing/#parallel-map-and-loops In particular, it notes that the following won't work as intended: a = zeros(10) @parallel for i=1:10 a[i] = i end But states that Distributed Arrays can fix this. It doesn't provide any specifics though. Simply trying: using DistributedArrays a = dzeros(10) @parallel for i=1:10 a[i] = i end Doesn't produce the desired behavior either. Neither does @everywhere using DistributedArrays. However, using SharedArrays does work: a = SharedArray(Float64,10) @parallel for i=1:10 a[i] = i end If there is a way to make something simple like this work with DistributedArrays, I think it would be nice to include an example. I've also seen people use @sync @parallel for i=1:10... but this doesn't seem necessary to get the desired behavior. Happy to contribute to the documentation if this sounds reasonable. @tkelman tkelman added the doc label on Nov 8, 2015 @timholy The Julia Language member timholy commented on Nov 8, 2015 Certainly doc improvements would be very welcome. It sounds like a minimalist improvement would be directing users to SharedArrays rather than DistributedArrays. As for a good illustration of DistributedArrays, I haven't used them in ages so I can't offer any useful advice. But surely there are others who can. I trust you've check the docs at https://github.com/JuliaParallel/DistributedArrays.jl? @kshyatt kshyatt added the parallel label on Nov 9, 2015 @ahwillia ahwillia added a commit to ahwillia/julia that referenced this issue on Nov 10, 2015 @ahwillia Add pointer to SharedArrays b78cf55 @ahwillia ahwillia referenced this issue on Nov 10, 2015 Merged Edit Docs: Add pointer to SharedArrays #13937 @ahwillia ahwillia closed this on Nov 17, 2015