Expand documentation

未關閉
#115 1 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
45/100
Issue 類型
文件
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
julia

研究方向

未指定文件或測試。先找出現有的 DistributedArrays 文件和 DArray 建構函式相關資料,接著檢視目前的 dzeros、切片、轉換和建構函式範例。完成的標準是記錄 DistributedArray 的儲存方式、複製行為和效能指引,並新增一個更清楚的中間建構函式範例及其程序索引說明。

由索引模型根據 Issue 內容生成。

描述

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:

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.

  1. Expound a bit more on DArray constructor. Perhaps an example somewhere between dfill and the Game of Life would help, like this:
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

主要語言
Julia
星號
205
分支
34
PR 合併指標
30 天內沒有已合併 PR

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

JuliaParallel/DistributedArrays.jl 的其他 Issue

查看 JuliaParallel/DistributedArrays.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。