Error: vector memory exhausted (limit reached?) - Can this happen if we use vectorization and run a large no of iterations with many chains?

Hi Everyone,

I have a model which has a lot of matrix multiplications and while running larger iterations with multiple chains using loops, I never saw this error.

But When I converted the for loops vectorization, I got this error for running larger iterations with multiple chains. Does this mean that my physical memory/memory allocation is not sufficient for the vector operations if we are sampling using many iterations?

I guess, but you should almost never need more than the default number of iterations with Stan.