Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deepcopy is broken for SharedArrays #6362

Closed
carlobaldassi opened this issue Apr 1, 2014 · 1 comment
Closed

deepcopy is broken for SharedArrays #6362

carlobaldassi opened this issue Apr 1, 2014 · 1 comment
Labels
domain:parallelism Parallel or distributed computation kind:bug Indicates an unexpected problem or unintended behavior

Comments

@carlobaldassi
Copy link
Member

In particular, trying to assign elements from a different process silently fails.

julia> a
3x4 SharedArray{Float64,2}:
 -0.978909   0.956941  -0.727437   0.123889 
  1.52651   -0.524361  -0.69585   -0.0347904
  0.556024   1.01309    0.724335  -1.39348  

julia> b = deepcopy(a)
3x4 SharedArray{Float64,2}:
 -0.978909   0.956941  -0.727437   0.123889 
  1.52651   -0.524361  -0.69585   -0.0347904
  0.556024   1.01309    0.724335  -1.39348  

julia> remotecall_fetch(2, setindex!, b, 5, 4:6)
3x4 SharedArray{Float64,2}:
 -0.978909  5.0  -0.727437   0.123889 
  1.52651   5.0  -0.69585   -0.0347904
  0.556024  5.0   0.724335  -1.39348  

julia> b
3x4 SharedArray{Float64,2}:
 -0.978909   0.956941  -0.727437   0.123889 
  1.52651   -0.524361  -0.69585   -0.0347904
  0.556024   1.01309    0.724335  -1.39348  
@carlobaldassi
Copy link
Member Author

Oh and worse than what is described above, the assignment acts on the original array:

julia> a
3x4 SharedArray{Float64,2}:
 -0.978909  5.0  -0.727437   0.123889 
  1.52651   5.0  -0.69585   -0.0347904
  0.556024  5.0   0.724335  -1.39348  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:parallelism Parallel or distributed computation kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant