Hi all,

I would like to know if there's any ways to distribute an array the way I 
want it.
For example, 

if I have I have 4 workers and an array, a :
julia> a = rand(4,3)
and I want to give each worker a row to work on, how can I distribute the 
array?

Julia has distribute function to slice array into DArray, but it doesn't 
slice it the way I want it.
julia> a_d = distribute(a)

julia> a_d.indexes
2x2 Array{(Range1{Int64},Range1{Int64}),2}:
 (1:2,1:2)  (1:2,3:3)
 (3:4,1:2)  (3:4,3:3)
In this case, some workers get square matrix, some get column vector. 
However, I want every worker to get a row.

I saw an article from Admin Magazine 
(http://www.admin-magazine.com/HPC/Articles/Julia-Distributed-Arrays)
saying that we can do things like:
a_d = distribute(a,1)
but it doesn't work on mine machine. Is it only supported on older versions 
of Julia? How can I accomplish the same thing on the newer version of Julia?

I'm using v0.2.1 on Mac OS X

Thanks

Daniel

Reply via email to