JuliaParallel / JuliaParallel/DistributedArrays.jl

Expand documentation

Đang mở
#115 1 bình luận 3 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Julia
Star
205
Fork
34
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

We are finding the documentation for DistributedArrays to be lacking in a few ways:

1. There is no description of the actual DistributedArray type. It would be helpful to know how DistributedArrays are stored across processes. A lot of people who are using DistributedArrays are experienced at distributed programming, and will find it helpful to know how things are implemented. For instance, it would be helpful to get an idea (without looking at the source code) of how the local parts are tied together in a single type.

2. When are values copied/not copied? For example:
```julia
da = dzeros(100,100)
sa = da[1:10, 35:50]
out = convert(DArray, sa)
```
Does the last line here copy the values of `sa`? More generally, information about performance would be really useful, as well as some performance tips.

3. Expound a bit more on DArray constructor. Perhaps an example somewhere between `dfill` and the Game of Life would help, like this:

```julia
procs = addprocs(5)

# Construct a DArray
da = DArray((2,5), procs, [1,5]) do I
# construct a local part
localpart = Array{Float64}(2,1)
for i in first(I) # first(I) = 1:2
localpart[i] = i
end
return localpart
end
```

It would help to describe this example as follows:

This DArray is distributed so that each of 5 processes holds one column. `I` is a tuple of indices describing the indices of the DArray that reside on a given process. On the first process, `I = (1:2,1:1)`. In the `init` function, we construct the local column as a regular `Array` and return it to the `DArray` constructor. Note that it is important to return `localpart`: if we don't do this, then Julia returns the last variable that was assigned, which is `localpart[2]` - but the `DArray` constructor is expecting an array.

cc @pearlzli

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

No documentation file or test is named. Start by locating the existing DistributedArrays documentation and the DArray constructor material, then review the current dzeros, slicing, conversion, and constructor examples. Done means documenting DistributedArray storage, copy behavior and performance guidance, and adding a clearer intermediate constructor example with its process-index explanation.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
julia
Lĩnh vực
distributed-systems, documentation
Loại issue
Tài liệu
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.