I'm not able to reproduce the above behavior with my latest changes to #11280, so that's a good sign!
If you're feeling ambitious/able, feel free to give that PR a spin to see if it fixes it for you as well. -Jacob On Mon, May 18, 2015 at 8:55 PM, Jacob Quinn <quinn.jac...@gmail.com> wrote: > I'm actually just about to do another round of windows testing on #11280, > so I'll test this out as well. Thanks for the report! > > -Jacob > > On Mon, May 18, 2015 at 6:27 PM, Sebastian Souyris < > sebastian.souy...@gmail.com> wrote: > >> It seems that there is a bug when you define several SharedArray in one >> call (for example using include("file.jl")). Or maybe I'm missing >> something about how to use SharedArray. I'm using Windows 7. Let me explain >> with an example: >> >> This code has no problem. It assign correctly the values of SharedArrays >> a and b: >> >> ###### >> julia> a = SharedArray(Float64, (2)); >> julia> b = SharedArray(Float64, (2)); >> julia> for i in 1:2 >> a[i] = i >> end >> julia> for i in 1:2 >> b[i] = i+2 >> end >> julia> a >> 2-element SharedArray{Float64,1}: >> 1.0 >> 2.0 >> julia> b >> 2-element SharedArray{Float64,1}: >> 3.0 >> 4.0 >> ###### >> >> But the following code has a problem. It assign incorrectly the same >> value to a and b: >> >> ###### >> julia> a = SharedArray(Float64, (2));b = SharedArray(Float64, (2)); >> >> julia> for i in 1:2 >> a[i] = i >> end >> >> julia> for i in 1:2 >> b[i] = i+2 >> end >> >> julia> a >> 2-element SharedArray{Float64,1}: >> 3.0 >> 4.0 >> >> julia> b >> 2-element SharedArray{Float64,1}: >> 3.0 >> 4.0 >> ###### >> >> If you define multiple SharedArray in one call, the values of all the >> SharedArrays of that call are equal to the values of the last >> SharedArray that was defined and has assigned values. >> >> Is this behavior expected? Or is it a bug? >> >> >> Thanks! >> >> >