Hello everyone
I have a few general questions that I would appreciate if anyone with information on this topic could answer (most likely these questions have arisen or will arise for many people).
My questions are about parallelization in Stan’s models, so I would be happy if anyone has information on this topic (even outside of the questions I raised) could answer it in this post so that everyone can benefit.
I must say that I am aware that in the model fitting function itself (such as the “stan() function” in the “rstan” package or the “mod$sample() function” in the “cmdstanr” package) it is possible to parallelize with the help of an option (such as “cores = getOption(“mc.cores”, 20)”).
-
But is parallelization possible except within the model, with functions such as (reduce_sum)?
-
Is there much difference in terms of execution speed? Between parallelization alone within the model versus parallelization within and using functions such as “reduce_sum” simultaneously.
-
And if we want to do parallelization with the help of some functions or packages in Stan, how do I do it? (I mean a clear and good guide that explains step by step how to perform parallelization)
Thank you in advance for your response.