JuliaParallel / JuliaParallel/DistributedArrays.jl

All localparts of DArray are updated when only one is specified

Aperta
#238 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
205
Fork
34
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.