mcmahan
November 19, 2019, 6:07pm
1
I am hoping to use RStudio Cloud for a statistics course I will be teaching in January. The class relies heavily on rstan
(and in particular brms
). Unfortunately, the current 1GB memory limit in RStudio Cloud means it is impossible to compile stan models.
Is there any way to increase the memory limit for a specific project or group of users (students)? There will be fewer than 20 students in the course so it would not be a huge load.
Are these enormous models? 1Gb seems like plenty to me. Maybe there's some other problem.
mcmahan
November 19, 2019, 7:48pm
3
The models aren't big, but Stan writes C++ programs in the background that take a lot of memory to compile.
Others have run into this problem (e.g. Error running brms model on Rstudio cloud ; brms, rstan and other packages needing compilation in RStudio Cloud ) and for now it seems like RStan is just not usable on RStudio Cloud.
1 Like
This discussion about running stan under shiny might help. I imagine it has some of the same restrictions as RStudio Cloud.
1 Like
mcmahan
November 19, 2019, 9:01pm
5
I will look into solutions on that thread, thanks.
Though FWIW, it seems like the consensus is that it is a problem with memory:
Hi,
I was playing with the lagged SAR model example provided here when I encountered the error saying:
Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! In file included from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/smart_ptr/shared_ptr.hpp:28:0, from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/BH/include/boost/shared_ptr.hpp:17, from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math/prim/mat/fun/LDLT_factor.hpp:7, from /home/rstudio-user/R/x86_64-pc-linux-gnu-library/3.5/StanHeaders/include/stan/math/prim/mat/err/check_ldlt_factor.hpp:6, from /…
I have been using a RStudio Cloud project to teach rstan to biostatisticians at University of Birmingham.
I installed rstan in my project following the proof-of-concept project by Ben Goodrich . Everything was working great on Sat 16th Feb 2019, when I last created and ran materials.
Some time in between then and now, rstan has stopped working on RStudio Cloud. I do not think I have changed any configuration. I noticed Ben's project has stopped working too so I contacted him. Ben thinks it is related to memory usage. My error message (below) does not mention memory.
Does anyone know why it is failing?
If it is memory, can I apply or pay for more?
Any help appreciated.
Thanks,
Kristian
…
For instance this project that runs a simple Stan example stopped working when the memory restrictions went into place: Posit Cloud
1 Like
Yes it seems to be the case. The thread I linked above shows how to compile the stan offline and then use it online to avoid this.
system
Closed
December 10, 2019, 9:46pm
8
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.