Bring module into scope on multiple processes

I have a module and I want to bring it into scope on multiple workers. Is there a recommended way to do this? I tried the following, which produces lots of warnings:

julia> addprocs(1)
1-element Array{Int64,1}:
 2

julia> @everywhere using DataFrames
WARNING: replacing module DataFrames.
WARNING: Method definition vcat(Array{Void, 1}) in module DataFrames at /home/admin/.julia/v0.5/DataFrames/src/abstractdataframe/abstractdataframe.jl:687 overwritten in module DataFrames at /home/admin/.julia/v0.5/DataFrames/src/abstractdataframe/abstractdataframe.jl:687.
WARNING: Method definition describe(AbstractArray) in module DataFrames at /home/admin/.julia/v0.5/DataFrames/src/abstractdataframe/abstractdataframe.jl:380 overwritten in module DataFrames at /home/admin/.julia/v0.5/DataFrames/src/abstractdataframe/abstractdataframe.jl:380.
WARNING: Method definition describe(Any, AbstractArray{#T<:Number, N<:Any}) in module DataFrames at /home/admin/.julia/v0.5/DataFrames/src/abstractdataframe/abstractdataframe.jl:382 overwritten in module DataFrames at /home/admin/.julia/v0.5/DataFrames/src/abstractdataframe/abstractdataframe.jl:382.
WARNING: Method definition describe(Any, AbstractArray{#T<:Any, N<:Any}) in module DataFrames at /home/admin/.julia/v0.5/DataFrames/src/abstractdataframe/abstractdataframe.jl:399 overwritten in module DataFrames at /home/admin/.julia/v0.5/DataFrames/src/abstractdataframe/abstractdataframe.jl:399.

This is a known issue. A way to avoid the warnings would be

using Mod
addprocs(N)
@everywhere importall Mod
2 Likes

Thanks it works! Is this trick documented somewhere?

Not AFAIK. I am hoping https://github.com/JuliaLang/julia/pull/19073 or a variation of it gets merged.