-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory size error with large random effects models in rstanarm #27
Comments
Looking closely, those warning messages say that it's actually trying to On Tuesday, September 29, 2015, Michael H Andreae notifications@github.com
|
Great observation. Now I see. Thank you. I do not understand why the file But it is hence clear that I need to increase available RAM or can this be Ben suggested that a function could be implemented to drop the draws and Cheers
|
If you run traceback() does it give you more info on which function Or maybe setting options(error = recover) and then recreating the error. On Tuesday, September 29, 2015, Michael H Andreae notifications@github.com
|
@mhandreae Are you able to share the data for this model? |
Rerun with Debug
The data file is very large and I am not allowed to share the data, but we See you at 11am today as usual? Michael On Thu, Oct 1, 2015 at 1:21 PM, Jonah Gabry notifications@github.com
|
I reduced the size of the dataset to 10% (from 100,000 units of observation to 10,000), which reduced the number of random effects (from 3000 to 1000). rstanarm now runs the chains and save the stanfit object, indeed it converges and is a nice model. |
After we deactivated the QR decomposition in rstanarm the only remaining errror is:
Rerun with Debug |
Actually I think that stuff is fine. It's just showing you the path leading On Tuesday, October 13, 2015, Michael H Andreae notifications@github.com
|
I don't see what you think is an error. But in any case, it looks like a different issue than the memory issue, so this particular issue (#27) should be closed and a new issue opened for the new problem with a clear indication of what you think the problem is and how to reproduce it. |
Yeah, this isn't an error, just related to the warning about divergent On Tuesday, October 13, 2015, Bob Carpenter notifications@github.com
|
I think this was not really an rstanarm issue but rather a memory issue or possibly a rstan memory issue that happened to pop up when using rstanarm to estimate the model. It might be better now that rstanarm is not saving the warmup draws. |
Executive summary:
While rstanarm fits a random effects logistic regression model to my large dataset (~50,000 units of observations) and runs four chains without an issue, on trying to generate the stanfit object, I get a memory size error. There are about 2000 random effects in this model. The issue arises even with only 10 iterations. I have 8 RAM and four cores on a virtual windows server.
Error: cannot allocate vector of size 2.7 Gb In addition:
Warning messages:
1: In structure(.Internal(La_qr(x)), useLAPACK = TRUE, class = "qr") :
Reached total allocation of 8191Mb: see help(memory.size)
2: In structure(.Internal(La_qr(x)), useLAPACK = TRUE, class = "qr") :
Reached total allocation of 8191Mb: see help(memory.size)
3: In structure(.Internal(La_qr(x)), useLAPACK = TRUE, class = "qr") :
Reached total allocation of 8191Mb: see help(memory.size)
4: In structure(.Internal(La_qr(x)), useLAPACK = TRUE, class = "qr") :
Reached total allocation of 8191Mb: see help(memory.size)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] rstanarm_2.8.0 rstan_2.8.0 ggplot2_1.0.1 Rcpp_0.12.1 lme4_1.1-9
[6] Matrix_1.2-2 knitr_1.11
loaded via a namespace (and not attached):
[1] nloptr_1.0.4 plyr_1.8.3 shinyjs_0.2.0 xts_0.9-7
[5] base64enc_0.1-3 tools_3.2.2 digest_0.6.8 nlme_3.1-121
[9] gtable_0.1.2 lattice_0.20-33 rstudioapi_0.3.1 shiny_0.12.2
[13] shinystan_2.0.1 proto_0.3-10 loo_0.1.3 gridExtra_2.0.0
[17] stringr_1.0.0 gtools_3.5.0 dygraphs_0.4.5 htmlwidgets_0.5
[21] DT_0.1 stats4_3.2.2 grid_3.2.2 inline_0.3.14
[25] R6_2.1.1 minqa_1.2.4 reshape2_1.4.1 magrittr_1.5
[29] codetools_0.2-14 shinythemes_1.0.1 threejs_0.2.1 scales_0.3.0
[33] matrixStats_0.14.2 htmltools_0.2.6 MASS_7.3-43 splines_3.2.2
[37] xtable_1.7-4 mime_0.4 colorspace_1.2-6 httpuv_1.3.3
[41] stringi_0.5-5 munsell_0.4.2 markdown_0.7.7 zoo_1.7-12
The text was updated successfully, but these errors were encountered: