Hi, I’m trying to make a package in which I use Distributed.jl a bit.
Lets call it Intro.jl, and I have two files in src directory. Intro.jl contains this code:
module Intro
using Distributed
export mad, meap
include("test.jl")
end
test.jl contains this code:
function mad()
pmap(_ -> println("$(myid())", 1:10)
end
@everywhere function lerp(message)
println("$message from $(myid())")
end
function meap()
@sync begin
for pid in workers()
@async begin
remotecall_fetch(lerp, pid,"YO")
end
end
end
end
Now, Im able to open the REPL and run using Intro if I only use the mad function.
However when I use @everywhere on some functions I get this error:
Any tips on what I can do this to work?
I use my program as this
- julia --project=.
- using Distributed
- addprocs(4)
- using Intro
It then crashes