JuliaParallel / JuliaParallel/DistributedArrays.jl

localindices methods in conflict with SharedArrays

オープン
#194 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Julia
スター
205
フォーク
34
PR マージ指標
30日以内にマージされた PR はありません

説明

It seems like there is a conflict between localindices method between SharedArrays and DistributedArrays. Please, see the REPL output below.

10:46:39 $ julia-1.0
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.2 (2018-11-08)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> using SharedArrays

julia> SharedArrays.
SharedArray include range_1dim shm_unlink
SharedMatrix indexpids sa_refs shmem_fill
SharedVector init_loc_flds sdata shmem_rand
_shm_mmap_array initialize_shared_array shared_pids shmem_randn
eval localindices shm_mmap_array sub_1dim
finalize_refs print_shmem_limits shm_open
julia> using DistributedArrays
WARNING: using DistributedArrays.localindices in module Main conflicts with an existing identifier.

help?> SharedArrays.localindices
localindices(S::SharedArray)

Returns a range describing the "default" indices to be handled by the current process. This range should
be interpreted in the sense of linear indexing, i.e., as a sub-range of 1:length(S). In multi-process
contexts, returns an empty range in the parent process (or any process for which indexpids returns 0).

It's worth emphasizing that localindices exists purely as a convenience, and you can partition work on the
array among workers any way you wish. For a SharedArray, all indices should be equally fast for each
worker process.

help?> DistributedArrays.localindices
localindices(d)

A tuple describing the indices owned by the local process. Returns a tuple with empty ranges if no local
part exists on the calling process.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Reproduce the warning in the Julia 1.0.2 REPL by loading SharedArrays and DistributedArrays in that order. Compare the exported localindices methods and their documented return shapes, then determine the compatible API behavior and add or update a regression test showing that both packages can be used without an ambiguous identifier.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
julia
領域
distributed-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。