JuliaParallel / ClusterManagers.jl

Other
242 stars 74 forks source link

SharedArrays fails on ClusterManagers.jl #121

Open juandarias opened 5 years ago

juandarias commented 5 years ago

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 commented 5 years ago

Any idea?

vchuravy commented 5 years ago

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.

juandarias commented 5 years ago

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

vchuravy commented 5 years ago

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