I’ve been getting a situation where after a while of trying to adjust and debug my model, eventually I make a change to the model and RStan crashes during compilation, I think typically it’s inside g++. once this occurs there is absolutely no way to compile further models until I reboot…
well that is until I discovered that I could invalidate the filesystem cache
echo 3 > /proc/sys/vm/drop_caches
which immediately fixes the problem, probably because the compiler binary is then re-read from disk.
Now, I recognize this is probably a hardware or driver or kernel issue on my machine, but basically the fact is that running a big model in Stan with lots of data is a hard-core computation that stresses reliability of the machine (heat, cache, memory, paging, whatever).
My next machine will probably have ECC RAM, and I’m going to go look for bios update on my motherboard, and soforth, but just be aware that if for some reason you get suddenly an inability to compile your stan model, it might be because of some similar issue, rather than a bug in Stan. I don’t know how many times I thought I should report a bug only to have a reboot mysteriously fix the problem.