WARNING: replacing module ...

226 views
Skip to first unread message

Gabriel Mihalache

unread,
Feb 5, 2016, 11:10:24 PM2/5/16
to julia-users
Hello, all!
I must be doing something wrong. Say I have the following code in a file called myMod.jl


module myMod

using NLopt

function compute()
 
...
  pmap
(...)
 
...
end

end

and then in a console I do

addprocs()
@everywhere include("myMod.jl")
myMod
.compute()

I get a bunch of warnings, one per worker, complaining that the module NLopt is being replaced. This seems harmless in practice, but it's hinting that I'm doing something wrong.

What's the proper way to do this? (Let all workers know about my module and the packages it's using.) I'm on 0.4.3

Thank you!

Tim Holy

unread,
Feb 6, 2016, 7:20:06 AM2/6/16
to julia...@googlegroups.com
Just use `using`. You might have to do something like
push!(LOAD_PATH, pwd())
to solve any path problems.

Best,
--Tim
Reply all
Reply to author
Forward
0 new messages