I have some code in a module (say, MyModule.jl) for which I would like each 
worker in a pmap() to have access.  Right now, I accomplish this by 
something like:

addprocs(CPU_CORES)
@everywhere using MyModule
function dostuff(x)
# code that uses functions exported from MyModule
end
results = pmap(dostuff, X)

where X is an array of things to pass to dostuff

This works.  However, the @everywhere macro called on the using statement 
results in this set of warnings:

WARNING: replacing module MyModule

WARNING: replacing module MyModule

WARNING: replacing module MyModule

WARNING: replacing module MyModule


Is this the idiomatic way to accomplish this task?  I would have thought 
there is a way to write this code so that warnings such as these don't 
appear.

Reply via email to