Distributed Sampling with Turing with project environment

I have some code in a project (that I setup with DrWatson.jl but I don’t think that is too important). I try to get Turing available on all procs with

using Turing
using Distributed

addprocs(4)


@everywhere using DrWatson
@everywhere @quickactivate "IBUGS"
@everywhere using Turing

(the quickactivate just activates the project environment on each proc as far as I know). It seems like each proc wants to re-precompile Turing and I get an error. Is there better way to do this?

  1. Precompile the environment before trying to use it everywhere.
  2. Activate the environment first

If the advice given by mkitti does not work, can you post your error message?

I thought I had done that. I did it again to grab the error message but now it worked. So who knows!

EDIT: hold on i forgot to addprocs this time.