Since 1 month I am experiencing strange behaviours with the parallelization of chains. I try to explain myself better:
I start by calling the package and putting the options for the mc.cores as following :
library(rstan) options(mc.cores = parallel::detectCores()) rstan_options(auto_write = TRUE)
Then I set the values for the number of iterations, warmup and chains, and I launch the simulation as follows:
iter <- 12000 warmup <- 10000 chains <- 6 fit = stan(model_name="Long_reg", file = file.source, data = dat, iter = iter, warmup = warmup, control = list(max_treedepth = 15), chains = chains, verbose = TRUE)
The simulation starts properly but one chain (a different one each time) proceed until it finishes its iterations, and the other chains (in this case the other 5) remains stuck without proceeding.
Am I missing something? Is there anybody else experiencing the same issue?