我正在尝试在Ubuntu Amazon EC2服务器上运行Julia中的一些并行代码,当我尝试运行它时,我收到以下错误:
ERROR: LoadError: MethodError: `+` has no method matching +(::RemoteException, ::RemoteException)
Closest candidates are:
+(::Any, ::Any, ::Any, ::Any...)
in mapreduce_seq_impl at ./reduce.jl:228
while loading /home/ubuntu/GameenderProd.jl, in expression starting on line 8
这是生成错误的代码:
using DecisionTree
@everywhere include("GameenderDrone.jl")
for i=0:4:8
for j=0:4:60
for k=0:4:8
for l=0:4:60
if i + j < 61 && k + l < 61 && (i<k || (i==k && j<=l))
rt=Matrix(0,1)
for q=1:100
library1=creatlib(j,i)
library2=creatlib(l,k)
player1=Player(Int8(1),Int8(20),[],[],[],[],[],Int8(0),Int8(8),Int8(size(library1)[1]))
player2=Player(Int8(2),Int8(20),[],[],[],[],[],Int8(0),Int8(8),Int8(size(library2)[1]))
player1.hand=library1[1:7]
player2.hand=library2[1:7]
rt=[rt; StartTable(library1,library2,player1,player2)]
end
result=pmap(gamerunner,rt)
total=sum(result)-100
rt=Matrix(0,1)
for q=1:100
library1=creatlib(l,k)
library2=creatlib(j,i)
player1=Player(Int8(1),Int8(20),[],[],[],[],[],Int8(0),Int8(8),Int8(size(library1)[1]))
player2=Player(Int8(2),Int8(20),[],[],[],[],[],Int8(0),Int8(8),Int8(size(library2)[1]))
player1.hand=library1[1:7]
player2.hand=library2[1:7]
rt=[rt; StartTable(library1,library2,player1,player2)]
end
negresult=pmap(gamerunner,rt)
total2=200-sum(negresult)
sumtotal=total + total2
output=[total total2 sumtotal]
cd("//home/ubuntu/result")
test=string(i,"C",j,"Lv",k,"C",l,"L.csv")
writedlm(test,output,",")
cd("//home/ubuntu")
end
end
end
end
end
当我在Juliabox上使用一个工作人员测试它时(在更改cd命令之后)它似乎工作。任何人都可以向我解释这个错误吗?
编辑:在12个工作人员的Juliabox上测试它会产生以下错误,并且看起来第一个文件已完成
juser@juliabox:~$ julia -p 12
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0 (2017-06-19 13:05 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
julia> include("GameenderProd.jl")
Worker 6 terminated.
ERROR (unhandled task failure): EOFError: read end of file
ERROR: LoadError: ProcessExitedException()
Stacktrace:
[1] #568 at ./asyncmap.jl:178 [inlined]
[2] foreach(::Base.##568#570, ::Array{Any,1}) at ./abstractarray.jl:1731
[3] maptwice(::Function, ::Channel{Any}, ::Array{Any,1}, ::Array{Any,2}, ::Vararg{Array{Any,2},N} where N) at ./asyncmap.jl:178
[4] wrap_n_exec_twice(::Channel{Any}, ::Array{Any,1}, ::Base.Distributed.##204#207{WorkerPool}, ::Function, ::Array{Any,2}, ::Vararg{Array{Any,2},N} where N) at ./a
syncmap.jl:154
[5] #async_usemap#553(::Function, ::Void, ::Function, ::Base.Distributed.##188#190, ::Array{Any,2}, ::Vararg{Array{Any,2},N} where N) at ./asyncmap.jl:103
[6] (::Base.#kw##async_usemap)(::Array{Any,1}, ::Base.#async_usemap, ::Function, ::Array{Any,2}, ::Vararg{Array{Any,2},N} where N) at ./<missing>:0
[7] (::Base.#kw##asyncmap)(::Array{Any,1}, ::Base.#asyncmap, ::Function, ::Array{Any,2}) at ./<missing>:0
[8] #pmap#203(::Bool, ::Int64, ::Void, ::Array{Any,1}, ::Void, ::Function, ::WorkerPool, ::Function, ::Array{Any,2}) at ./distributed/pmap.jl:126
[9] pmap(::WorkerPool, ::Function, ::Array{Any,2}) at ./distributed/pmap.jl:101
[10] #pmap#213(::Array{Any,1}, ::Function, ::Function, ::Array{Any,2}) at ./distributed/pmap.jl:156
[11] macro expansion at /home/juser/GameenderProd.jl:40 [inlined]
[12] anonymous at ./<missing>:?
[13] include_from_node1(::String) at ./loading.jl:569
[14] include(::String) at ./sysimg.jl:14
while loading /home/juser/GameenderProd.jl, in expression starting on line 9