Where does the rstan saves the compiled models (called dso)?

Viewed 30

I run Ubuntu 20.04. Every time I start sampling from my model, I get a segfault error. When I do it from a new container on the same machine, everything runs smoothly. I have re-installed R, purged all its packages and installed them anew, and even cleared all the files in /tmp/Rtmp* but clearly every time I run

model<-stan_model("/my/path/model1.stan")

R returns immediately (in less than a second), which means it uses a cached version of the compiled model, despite my efforts to re-boot everything from scratch. Needless to say, the model crashes each time I try to sample from it.

I've learned that the models are compiled into a dso file, which is saved somewhere in my filesystem, but I can't find it. I also cannot find any documentation about the location.

Where are the compiled models saved, and how to purge that cache?

0 Answers
Related