When I upgraded to Julia v1.5.1-1 using JuliaPro , the distributed processors no longer can find any of the packages that have been imported. The following is the error message that I receive.
ERROR: LoadError: On worker 2:
LoadError: ArgumentError: Package Optim not found in current path:
Run import Pkg; Pkg.add("Optim") to install the Optim package.
require at .\loading.jl:893
include at .\client.jl:457
top-level scope at none:1
eval at .\boot.jl:331 #103 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\process_messages.jl:290
run_work_thunk at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\process_messages.jl:88 #96 at .\task.jl:356
in expression starting at C:\Users\smickus3\Documents\CAMM_Codes\ParrallelOpt\BFGS.jl:1
…and 2 more exception(s).
Stacktrace:
[1] sync_end(::Channel{Any}) at .\task.jl:314
[2] macro expansion at .\task.jl:333 [inlined]
[3] remotecall_eval(::Module, ::Array{Int64,1}, ::Expr) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\macros.jl:218
[4] top-level scope at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\macros.jl:202
[5] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1088
You may need to instantiate the workers with the correct environment. If the packages you need are in your project, you’ll want to add processes with: addprocs(exeflags="--project") without modification.
I know that it is a bit late but to me the thing that worked was both to specify the exeflag and the directory of the project, because I was running the code in a notebook that was not in the same directory that my project.