julia icon indicating copy to clipboard operation
julia copied to clipboard

Allow @everywhere include(...) to override default path behavior

Open dlakelan opened this issue 2 years ago • 0 comments

According to tests and the documentation string:

  Similar to calling remotecall_eval(Main, procs, expr), but with two extra
  features:

  - `using` and `import` statements run on the calling process first, to ensure
    packages are precompiled.
  - The current source file path used by `include` is propagated to other processes.

This last "feature" overrides the path even if that isn't desired behavior. I discovered this when doing

@everywhere include("./utilities.jl")

and I expected it to read from the "current directory" that the remote julia process started in, but in fact it tried to read from my home directory (same directory as on my machine where the whole process was initiated) however that path doesn't exist remotely and isn't the desired behavior. It would be nice to have an option to not have @everywhere include(...) override the path.

dlakelan avatar Sep 13 '22 21:09 dlakelan