ddata doesn't work as intended when length(data) = length(pids)
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- julia
研究方向
從 ddata 入口點開始,針對長度等於 worker 數量的資料(包括不帶資料的 ddata()),比較其文件所述行為與提供的重現範例。使用 Distributed 和 DistributedArrays 重新執行這些範例;完成的標準是兩種情況都能正常運作,不再出現所示的 TypeError 或 MethodError,同時文件所述行為保持準確。
由索引模型根據 Issue 內容生成。
描述
The documentation says the following about ddata:
The function
ddata(;T::Type=Any, init::Function=I->nothing, pids=workers(), data::Vector=[])can be used to created a distributed vector whose localparts need not be Arrays.
...
Argumentdataif supplied is distributed over thepids.length(data)must be a multiple oflength(pids). If the multiple is 1, returns aDArray{T,1,T}where T iseltype(data). If the multiple is greater than 1, returns aDArray{T,1,Array{T,1}}, i.e., it is equivalent to callingdistribute(data).
The case when "the multiple is 1" is giving me trouble:
julia> using Distributed; addprocs(2)
julia> using DistributedArrays
julia> ddata(data=["foo", "bar"])
2-element DArray{String, 1, String}:
ERROR: TypeError: in typeassert, expected String, got a value of type Char
...
julia> ddata()
ERROR: On worker 2:
MethodError: no method matching getindex(::Nothing, ::Int64)
...
Note that ddata works as intended for multiples greater than 1:
julia> ddata(data=["foo", "bar", "foo", "bar"])
4-element DArray{String, 1, Vector{String}}:
"foo"
"bar"
"foo"
"bar"
julia> ddata(;T=Any, init=I->nothing, pids=workers(), data=[nothing, nothing, nothing, nothing])
4-element DArray{Nothing, 1, Vector{Nothing}}:
nothing
nothing
nothing
nothing
First time posting an issue, hope I'm doing things right!
- 主要語言
- Julia
- 星號
- 205
- 分支
- 34
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
JuliaParallel/DistributedArrays.jl 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 35/100
JuliaParallel/DistributedArrays.jl#255 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 45/100
JuliaParallel/DistributedArrays.jl#238 · 1 則留言 ·
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 4/5 3-5 天 新手友好度 30/100
-
難度 4/5 3-5 天 新手友好度 35/100
查看 JuliaParallel/DistributedArrays.jl 的全部 Issue
相似的 Issue
-
path: splitext treats directory references and leading dots as extensions可能已有人在做 @Hiten0305l 今天認領。 未關閉
難度 2/5 半天 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
JuliaParallel/Hwloc.jl#93 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
SciML/SciMLBenchmarks.jl#1996 ·
維護者通常 1 天內回覆
-
Affine transformations of `JohnsonSU` could return a `JohnsonSU`可能已有人在做 @devmotion 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
JuliaStats/Distributions.jl#2117 ·
維護者通常 2 天內回覆
-
Difficult-group test writes to a closed IOStream, failing on Julia 1.14.0-beta1可能已有人在做 @ChrisRackauckas 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 74/100
JuliaSymbolics/SymbolicIntegration.jl#162 · 1 則留言 ·