Skip to content

Instantly share code, notes, and snippets.

@ivirshup
Last active April 27, 2016 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivirshup/146fd4b69a0a1ad1324a5e107ed81747 to your computer and use it in GitHub Desktop.
Save ivirshup/146fd4b69a0a1ad1324a5e107ed81747 to your computer and use it in GitHub Desktop.
Error using `pmap(_) do x`
julia> addprocs(1)
1-element Array{Int64,1}:
2
julia> pmap([rand(2) for i in 1:2]) do x
map(typeof, x)
end
2-element Array{Any,1}:
[Float64,Float64]
[Float64,Float64]
julia> pmap([rand(2) for i in 1:2]) do x
map(y->typeof(y), x)
end
ERROR: On worker 2:
UndefVarError: ##4#6 not defined
in #3 at ./REPL[3]:2
[inlined code] from ./asyncmap.jl:75
in #394 at ./task.jl:308
in sync_end at ./task.jl:274
[inlined code] from ./asyncmap.jl:59
in pump_source at ./asyncmap.jl:120
in next at ./asyncmap.jl:136
[inlined code] from ./asyncmap.jl:61
in _collect at ./array.jl:233
[inlined code] from ./range.jl:70
in asyncmap at ./asyncmap.jl:156
in #380 at ./pmap.jl:23
[inlined code] from ./promotion.jl:229
in #308 at ./multi.jl:1017
in run_work_thunk at ./multi.jl:747
[inlined code] from ./multi.jl:1017
in #307 at ./event.jl:46
in #remotecall_fetch#293(::Array{Any,1}, ::Any, ::Any, ::Base.Worker, ::Array{Array{Float64,1},1}, ::Vararg{Array{Array{Float64,1},1}}) at ./multi.jl:807
[inlined code] from ./promotion.jl:229
in #remotecall_fetch#294(::Array{Any,1}, ::Any, ::Any, ::Int64, ::Any, ::Vararg{Any}) at ./multi.jl:810
[inlined code] from ./promotion.jl:229
in #remotecall_pool#368(::Array{Any,1}, ::Any, ::Any, ::Any, ::WorkerPool, ::Array{Array{Float64,1},1}, ::Vararg{Array{Array{Float64,1},1}}) at ./workerpool.jl:39
[inlined code] from ./promotion.jl:229
in #remotecall_fetch#371(::Array{Any,1}, ::Any, ::Any, ::WorkerPool, ::Array{Array{Float64,1},1}, ::Vararg{Array{Array{Float64,1},1}}) at ./workerpool.jl:67
[inlined code] from ./promotion.jl:229
in (::Base.###376#377#379{WorkerPool,Base.##380#381{##3#5}})(::Array{Any,1}, ::Any, ::Array{Array{Float64,1},1}, ::Vararg{Array{Array{Float64,1},1}}) at ./workerpool.jl:94
[inlined code] from ./asyncmap.jl:75
in (::Base.##394#396{Base.AsyncCollector,Base.AsyncCollectorState})() at ./task.jl:308
...and 1 other exceptions.
in sync_end() at ./task.jl:274
[inlined code] from ./asyncmap.jl:59
in pump_source(::Base.AsyncGenerator, ::Base.AsyncGeneratorState) at ./asyncmap.jl:120
in next(::Base.AsyncGenerator, ::Base.AsyncGeneratorState) at ./asyncmap.jl:136
in start(::Base.Flatten{Base.AsyncGenerator}) at ./iterator.jl:447
in _collect(::UnitRange{Int64}, ::Base.Flatten{Base.AsyncGenerator}, ::Base.HasEltype, ::Base.SizeUnknown) at ./array.jl:233
[inlined code] from ./range.jl:70
in collect(::Base.Flatten{Base.AsyncGenerator}) at ./array.jl:224
in pmap(::WorkerPool, ::Any, ::Array{Array{Float64,1},1}, ::Vararg{Array{Array{Float64,1},1}}) at ./pmap.jl:49
in #pmap#664(::Void, ::Void, ::Void, ::Any, ::Any, ::Array{Array{Float64,1},1}, ::Vararg{Array{Array{Float64,1},1}}) at ./deprecated.jl:1019
[inlined code] from ./random.jl:327
in anonymous at ./<no file>:4294967295
in eval(::Module, ::Any) at ./boot.jl:236
julia> versioninfo()
Julia Version 0.5.0-dev+3749
Commit e8304a5 (2016-04-26 04:24 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin15.4.0)
CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.7.1 (ORCJIT, haswell)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment