Compilation time excessively long on Windows with fresh R install

I’ve recently performed a fresh\clean install of R, RTools and RStudio on Windows to their latest/newest versions and then installed Stan from CRAN. When doing so, I’ve found that when trying to fit the standard 8schools model (as in the Getting Started page), the compilation time is ridiculously long (on the order of five to ten minutes, or alternatively ‘8minutes’). This happens regardless of whether I configure the C++ toolchain (according to the instructions on the Getting Started page) or not.

Once the program has been compiled, sampling doesn’t take anytime at all, but making any type of small changes to the Stan script (e.g such as by changing the prior variance) leads to another lengthy recompilation time.

I’m therefore appreciate any suggestions as to what I can try to diagnose what could be causing this!

Operating System: Windows 10
Interface Version: RStan 2.19.3

Hey there! I have no idea what could cause this tbh. Tagging @bgoodri who might know what’s up.

If you are willing to give CmdStanR a try, here is a guide I wrote up some time ago. I can really recommend the WSL approach. Compilation and sampling is much faster. And with CmdStanR you are always on the newest Stan version. :)

Cheers,
Max

I’ll give CmdStanR a try and report back as to whether I have the same issues with that - at the very least, if things still don’t work it might be more amenable to figuring out what is going on. Thanks for the suggestion!

1 Like