JuliaParallel / JuliaParallel/DistributedArrays.jl

All localparts of DArray are updated when only one is specified

Ouverte
#238 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Julia
Étoiles
205
Forks
34
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I ran into an issue when running this block of code:
```
using Distributed
if nprocs() == 1
addprocs()
end
@everywhere using DistributedArrays

a = dfill([], 20)
@sync @distributed for i in 1:20
b = (i, myid())
push!(localpart(a)[1], b)
end

a
```

I would expect ``a`` to be
```
[(1,2), (2,2), (3,2)]
[]
[]
[(4, 3), (5, 3), (6, 3)]
[]

```
because I am only pushing to the first local part of ``a``. But what I get is this:
```
[(1, 2), (2, 2), (3, 2)]
[(1, 2), (2, 2), (3, 2)]
[(1, 2), (2, 2), (3, 2)]
[(4, 3), (5, 3), (6, 3)]
[(4, 3), (5, 3), (6, 3)]

[(17, 8), (18, 8)]
[(17, 8), (18, 8)]
[(19, 9), (20, 9)]
[(19, 9), (20, 9)]
```

It seems that i am pushing to all local parts of ``a``, not just the first one.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start by running the DistributedArrays reproduction in the issue, including the dfill, @distributed loop, and localpart(a)[1] push. Trace how localpart(a) handles the selected part and verify that the completed result changes only the first local part, while the other parts remain empty.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
julia
Domaine
distributed-systems
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.