Skip to content

deepcopy is broken for SharedArrays #6362

Closed
@carlobaldassi

Description

@carlobaldassi

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  

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorparallelismParallel or distributed computation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions