Error when I use the function distribute(array) from the libray DistributedArrays

According to this post the issue is that the processes are likely added after the “@everywhere using …” commands. I found that by reorganizing my import statements I could make this error go away. Specifically make sure you addprocs first like

using Distributed
addprocs(4)
@everywhere using DistributedArrays
import("myfile.jl")
2 Likes