diff --git a/src/stan/services/sample/hmc_nuts_dense_e.hpp b/src/stan/services/sample/hmc_nuts_dense_e.hpp index 0fb818b19c..457f7483c1 100644 --- a/src/stan/services/sample/hmc_nuts_dense_e.hpp +++ b/src/stan/services/sample/hmc_nuts_dense_e.hpp @@ -237,7 +237,7 @@ int hmc_nuts_dense_e(Model& model, size_t num_chains, util::run_sampler(samplers[i], model, cont_vectors[i], num_warmup, num_samples, num_thin, refresh, save_warmup, rngs[i], interrupt, logger, sample_writer[i], - diagnostic_writer[i], init_chain_id + i); + diagnostic_writer[i], init_chain_id + i, num_chains); } }, tbb::simple_partitioner()); diff --git a/src/stan/services/sample/hmc_nuts_diag_e.hpp b/src/stan/services/sample/hmc_nuts_diag_e.hpp index bb789c0151..94fd66c748 100644 --- a/src/stan/services/sample/hmc_nuts_diag_e.hpp +++ b/src/stan/services/sample/hmc_nuts_diag_e.hpp @@ -232,7 +232,7 @@ int hmc_nuts_diag_e(Model& model, size_t num_chains, util::run_sampler(samplers[i], model, cont_vectors[i], num_warmup, num_samples, num_thin, refresh, save_warmup, rngs[i], interrupt, logger, sample_writer[i], - diagnostic_writer[i], init_chain_id + i); + diagnostic_writer[i], init_chain_id + i, num_chains); } }, tbb::simple_partitioner());