ClusterManagers.jl icon indicating copy to clipboard operation
ClusterManagers.jl copied to clipboard

SharedArrays fails on ClusterManagers.jl

Open juandarias opened this issue 6 years ago • 4 comments

The documentation example for SharedArrays in parallel computing fails when using a SlurmManager: using ClusterManagers, Distributed addprocs(SlurmManager(8), topology=:all_to_all) using SharedArrays

a = SharedArray{Float64}(100) @distributed for i = 1:100 a[i] = i end

Returns an empty array. The following code will work:

using ClusterManagers, Distributed addprocs(8, topology=:all_to_all) using SharedArrays

a = SharedArray{Float64}(100) @distributed for i = 1:100 a[i] = i end

Packages: Julia 1.1.0 ClusterManagers 0.3.2

juandarias avatar Jul 15 '19 09:07 juandarias

Any idea?

juandarias avatar Aug 18 '19 20:08 juandarias

I am not sure what should happen here SharedArray only works when all processes are on the same machine. Something that is not guaranteed with SLURM.

vchuravy avatar Sep 01 '19 14:09 vchuravy

Shall I raise this as an issue or feature request for SharedArray?

juandarias avatar Sep 04 '19 08:09 juandarias

As I said it is not something that SharedArray can really support, but maybe it could throw an error.

vchuravy avatar Sep 09 '19 21:09 vchuravy