Is there a way to do use all 9 threads in the following functions?
function f1()
Threads.@threads for i in 1:3
println("MCMC")
println("$(Threads.threadid())")
sleep(3.0)
end
println("#############")
end
function f2()
Threads.@threads for i in 1:3
println("Model")
f1()
println("$(Threads.threadid())")
end
end
Right now running this prints the following:
$ julia -t 9
> f2()
Model
Model
Model
MCMC
2
MCMC
1
MCMC
3
MCMC
3
MCMC
1
MCMC
2
MCMC
MCMC
MCMC
2
3
1
#############
#############
2
1
#############
3