Suppose I have a file located at
module ModuleA export f function f() return("foo") end end
and another file located at
addprocs(4) @everywhere include("ModuleA.jl")
Running main.jl from inside
julia main.jl works fine, but fails from anywhere else because worker 2 tries to locate
ModuleA.jl inside the current working directory.
As a fix I tried
@everywhere include(joinpath(@__DIR__, "ModuleA.jl"))
nothing on the workers.
Can someone enlighten me what’s happening here?
The problem I want to solve is making an existing module available on all workers while still being able to call the script from any working directory.