DistributedArrays Issues



I’m experimenting with DistributedArrays and running into a few minor hiccups (Julia 0.5).

The first is that the first time in I include the file with the line @everywhere using DistributedArray, I get four warnings (for each core): replacing module DistributedArrays. I’m not sure what this means. I believe you’re supposed to load the module in every process.

The second issue is that if I close the DArray and sometime later remove all workers, I get the following error.

ERROR (unhandled task failure): ArgumentError: stream is closed or unusable
in check_open(::TCPSocket) at .\stream.jl:258
in uv_write(::TCPSocket, ::Ptr{UInt8}, ::UInt64) at .\stream.jl:806
in flush(::TCPSocket) at .\stream.jl:855
in send_msg_(::Base.Worker, ::Base.MsgHeader, ::Base.CallMsg{:call_fetch}, ::Bool) at .\multi.jl:327
in #remotecall_fetch#608(::Array{Any,1}, ::Function, ::Function, ::Base.Worker, ::Tuple{Int64,Int64}, ::Vararg{Tuple{Int64,Int64},N}) at .\multi.jl:1065
in remotecall_fetch(::Function, ::Base.Worker, ::Tuple{Int64,Int64}, ::Vararg{Tuple{Int64,Int64},N}) at .\multi.jl:1062
in #remotecall_fetch#611(::Array{Any,1}, ::Function, ::Function, ::Int64, ::Tuple{Int64,Int64}, ::Vararg{Tuple{Int64,Int64},N}) at .\multi.jl:1080
in remotecall_fetch(::Function, ::Int64, ::Tuple{Int64,Int64}, ::Vararg{Tuple{Int64,Int64},N}) at .\multi.jl:1080
in (::DistributedArrays.##28#30{Tuple{Int64,Int64}})() at .\task.jl:360
in sync_end() at .\task.jl:311
in macro expansion at .\task.jl:327 [inlined]
in close_by_identity(::Tuple{Int64,Int64}, ::Array{Int64,1}) at C:\Users\goldfing\.julia\v0.5\DistributedArrays\src\core.jl:209
in (::DistributedArrays.##31#32{DistributedArrays.DArray{Float64,1,Array{Float64,1}}})() at .\event.jl:68

Looking at the source, I see that close doesn’t happen immediately; it gets scheduled. So, I assume if I’m going to clear out all the processes, I should never call close??? Is there a way to force it? I couldn’t find anything about it in the documentation.

The third issue is the symbol indexing shortcut doesn’t seem to work. If I use v[:lp], I get the following error. I don’t understand where it’s getting Tuple{Symbols} from. Getindex is clearly defined for Symbol in the code, and localpart(v) works just fine.

indexing DistributedArrays.DArray{Float64,1,Array{Float64,1}} with types Tuple{Symbol} is not supported