Created
July 11, 2016 12:50
-
-
Save jonathanBieler/b14cf743185917442d3bde7f4b85aec2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> function test() | |
string(myid()) * " : it works!" | |
end | |
test (generic function with 1 method) | |
julia> addprocs(1) | |
1-element Array{Int64,1}: | |
2 | |
julia> remotecall_fetch(2,isdefined,:test) | |
false | |
julia> r = remotecall_wait(2, | |
(HOMEDIR)->begin | |
include(joinpath(HOMEDIR,"test.jl")) | |
end | |
,pwd()) | |
RemoteRef{Channel{Any}}(2,1,4) | |
julia> remotecall_fetch(2,test) | |
"2 : it works!" | |
julia> remotecall_fetch(2,workspace) | |
julia> remotecall_fetch(2,isdefined,:test) | |
true | |
julia> remotecall_fetch(2,test) | |
ERROR: On worker 2: | |
function test not defined on process 2 | |
in error at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib | |
in anonymous at serialize.jl:526 | |
in anonymous at multi.jl:923 | |
in run_work_thunk at multi.jl:661 | |
[inlined code] from multi.jl:923 | |
in anonymous at task.jl:63 | |
in remotecall_fetch at multi.jl:747 | |
in remotecall_fetch at multi.jl:750 | |
julia> r = remotecall_wait(2, | |
(HOMEDIR)->begin | |
include(joinpath(HOMEDIR,"test.jl")) | |
end | |
,pwd()) | |
RemoteRef{Channel{Any}}(2,1,10) | |
julia> fetch(r) | |
test (generic function with 1 method) | |
julia> remotecall_fetch(2,test) | |
ERROR: On worker 2: | |
function test not defined on process 2 | |
in error at /Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/sys.dylib | |
in anonymous at serialize.jl:526 | |
in anonymous at multi.jl:923 | |
in run_work_thunk at multi.jl:661 | |
[inlined code] from multi.jl:923 | |
in anonymous at task.jl:63 | |
in remotecall_fetch at multi.jl:747 | |
in remotecall_fetch at multi.jl:750 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment