The Julia documentation talks about distributed arrays, but I couldn't find 
anything about distributed sparse matrices (except for an MIT class project 
report, but sadly without code). If there is some and I missed it, I 
apologize (and I'd very much like to know where it is). At least some of 
the functionality seems to be there though:

julia> A = sprand(10, 10, .25);

julia> dA = distribute(A);

julia> dA.chunks
1x2 Array{RemoteRef,2}:
 RemoteRef(2,1,1715)  RemoteRef(3,1,1716)

julia> dA.cuts
2-element Array{Array{Int64,1},1}:
 [1,11]
 [1,6,11]

julia> AA = reduce(hcat, map(fetch, dA.chunks));

julia> A - AA
10x10 sparse matrix with 0 Float64 entries:

I'm wondering if the above is just a fortunate side effect of 
SparseMatrixCSC being a subtype of AbstractArray, or if it's indeed 
intentional and is there to stay (and can be relied upon, at least for the 
near future).

If it's intentional, are there more convenient ways to initialize 
distributed sparse matrices?

Thanks!

Reply via email to