I'd like to modify the chunks of a distributed array in parallel. The 
following bit of code does not modify the distributed array d:

julia> d = dones(10);
julia>@spawnat 2 begin
       d_loc = localpart(d);
       d_loc = d_loc + 2;
       end

This one does:

julia> @spawnat 2 begin
       d_loc = localpart(d);
       for i = 1 : size(d_loc, 1)
       d_loc[i] = d_loc[i] + 2;
       end
       end

Is there a more convenient syntax that I missed?

Thanks.

Reply via email to