I'm going to really go out on a limb here, but my hunch is that each of the four julia processes created by Chris is running each sampler on its own set of arrays. So, you have four sets of distributed arrays.
In other words, the println() lines should be executed only once:
if isinteractive()
## Timings
println("JGibbs1: $([@elapsed JGibbs1(20000, 200) for i=1:10])")
println("JGibbs2: $([@elapsed JGibbs2(20000, 200) for i=1:10])")
println("JGibbs3: $([@elapsed JGibbs3(20000, 200) for i=1:10])")
println("dJGibbs3a: $([@elapsed dJGibbs3a(20000, 200) for i=1:10])")
end
My home machine crashes when running samplegibbs so I can't test my hunch at the moment, but it may be worth a shot.
-- mb