{"action":"created","issue":{"url":"https://api.github.com/repos/stan-dev/rstan/issues/528","repository_url":"https://api.github.com/repos/stan-dev/rstan","labels_url":"https://api.github.com/repos/stan-dev/rstan/issues/528/labels{/name}","comments_url":"https://api.github.com/repos/stan-dev/rstan/issues/528/comments","events_url":"https://api.github.com/repos/stan-dev/rstan/issues/528/events","html_url":"https://github.com/stan-dev/rstan/issues/528","id":324406400,"number":528,"title":"out of memory?","user":{"login":"jpritikin","id":2002771,"avatar_url":"https://avatars1.githubusercontent.com/u/2002771?v=4","gravatar_id":"","url":"https://api.github.com/users/jpritikin","html_url":"https://github.com/jpritikin","followers_url":"https://api.github.com/users/jpritikin/followers","following_url":"https://api.github.com/users/jpritikin/following{/other_user}","gists_url":"https://api.github.com/users/jpritikin/gists{/gist_id}","starred_url":"https://api.github.com/users/jpritikin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpritikin/subscriptions","organizations_url":"https://api.github.com/users/jpritikin/orgs","repos_url":"https://api.github.com/users/jpritikin/repos","events_url":"https://api.github.com/users/jpritikin/events{/privacy}","received_events_url":"https://api.github.com/users/jpritikin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-18T13:15:55Z","updated_at":"2018-05-18T20:09:49Z","closed_at":null,"author_association":"NONE","body":"#### Summary:\r\nPlease provide a short summary (no more than a sentence or two).\r\n\r\nAt the end of sampling, I get:\r\n\r\nError in FUN(X[[i]], ...) : \r\n  trying to get slot \"mode\" from an object of a basic class (\"NULL\") with no slots\r\nCalls: stan ... sampling -> sampling -> .local -> sapply -> lapply -> FUN\r\nExecution halted\r\n\r\nMy model doesn't have that many parameters, but I do want to include per datum log_lik for loo and sample data sets for posterior predicted checks. So each sample has 21216 columns. I used stan(..., sample_file=tempdir()) and I can see each chain only used about 122M. I use 6 chains. That should easily fit in RAM on my machine.\r\n\r\nIs there an easy work-around? Can I use cmdstan and then incorporate the results back into an rstan object?\r\n\r\n#### Description:\r\nDescribe the issue as clearly as possible.\r\n\r\nI read some similar reports on the forums that suggest that this problem might be caused by running out of memory. My computer has 10GiB RAM available, but maybe there is something really inefficient going on.\r\n\r\n#### Reproducible Steps:\r\nPlease report steps to reproduce the issue. If it's not possible to reproduce, please include a description of how you discovered the issue.\r\n\r\nI can include a complete example, but first tell me that it would be useful.\r\n\r\n#### RStan Version:\r\n\r\nSession info -----------------------------------------------------\r\n setting  value                       \r\n version  R version 3.5.0 (2018-04-23)\r\n system   x86_64, linux-gnu           \r\n ui       RStudio (1.1.447)           \r\n language en_US:en                    \r\n collate  en_US.UTF-8                 \r\n tz       America/New_York            \r\n date     2018-05-18                  \r\n\r\nPackages ---------------------------------------------------------\r\n package      * version   date       source        \r\n assertthat     0.2.0     2017-04-11 CRAN (R 3.5.0)\r\n BH             1.66.0-1  2018-02-13 CRAN (R 3.5.0)\r\n cli            1.0.0     2017-11-05 CRAN (R 3.5.0)\r\n colorspace     1.3-2     2016-12-14 CRAN (R 3.5.0)\r\n crayon         1.3.4     2017-09-16 CRAN (R 3.5.0)\r\n dichromat      2.0-0     2013-01-24 CRAN (R 3.5.0)\r\n digest         0.6.15    2018-01-28 CRAN (R 3.5.0)\r\n ggplot2        2.2.1     2016-12-30 CRAN (R 3.5.0)\r\n glue           1.2.0     2017-10-29 CRAN (R 3.5.0)\r\n graphics     * 3.5.0     2018-04-24 local         \r\n grDevices    * 3.5.0     2018-04-24 local         \r\n grid           3.5.0     2018-04-24 local         \r\n gridExtra      2.3       2017-09-09 CRAN (R 3.5.0)\r\n gtable         0.2.0     2016-02-26 CRAN (R 3.5.0)\r\n inline         0.3.14    2015-04-13 CRAN (R 3.5.0)\r\n labeling       0.3       2014-08-23 CRAN (R 3.5.0)\r\n lattice        0.20-35   2017-03-25 CRAN (R 3.5.0)\r\n lazyeval       0.2.1     2017-10-29 CRAN (R 3.5.0)\r\n magrittr       1.5       2014-11-22 CRAN (R 3.5.0)\r\n MASS           7.3-50    2018-04-30 CRAN (R 3.5.0)\r\n Matrix         1.2-14    2018-04-09 CRAN (R 3.5.0)\r\n methods      * 3.5.0     2018-04-24 local         \r\n munsell        0.4.3     2016-02-13 CRAN (R 3.5.0)\r\n pillar         1.2.2     2018-04-26 CRAN (R 3.5.0)\r\n plyr           1.8.4     2016-06-08 CRAN (R 3.5.0)\r\n R6             2.2.2     2017-06-17 CRAN (R 3.5.0)\r\n RColorBrewer   1.1-2     2014-12-07 CRAN (R 3.5.0)\r\n Rcpp           0.12.16   2018-03-13 CRAN (R 3.5.0)\r\n RcppEigen      0.3.3.4.0 2018-02-07 CRAN (R 3.5.0)\r\n reshape2       1.4.3     2017-12-11 CRAN (R 3.5.0)\r\n rlang          0.2.0     2018-02-20 CRAN (R 3.5.0)\r\n rstan          2.17.3    2018-01-20 CRAN (R 3.5.0)\r\n scales         0.5.0     2017-08-24 CRAN (R 3.5.0)\r\n StanHeaders    2.17.2    2018-01-20 CRAN (R 3.5.0)\r\n stats        * 3.5.0     2018-04-24 local         \r\n stats4         3.5.0     2018-04-24 local         \r\n stringi        1.1.7     2018-03-12 CRAN (R 3.5.0)\r\n stringr        1.3.0     2018-02-19 CRAN (R 3.5.0)\r\n tibble         1.4.2     2018-01-22 CRAN (R 3.5.0)\r\n tools          3.5.0     2018-04-24 local         \r\n utf8           1.1.3     2018-01-03 CRAN (R 3.5.0)\r\n utils        * 3.5.0     2018-04-24 local         \r\n viridisLite    0.3.0     2018-02-01 CRAN (R 3.5.0)\r\n\r\n#### R Version:\r\nThe version of R you are running (e.g., from `R.version.string`)\r\n\r\nR version 3.5.0 (2018-04-23)\r\n\r\n#### Operating System:\r\nYour operating system (e.g., OS X 10.11.3)\r\n\r\nUbuntu bionic\r\n"},"comment":{"url":"https://api.github.com/repos/stan-dev/rstan/issues/comments/390318723","html_url":"https://github.com/stan-dev/rstan/issues/528#issuecomment-390318723","issue_url":"https://api.github.com/repos/stan-dev/rstan/issues/528","id":390318723,"user":{"login":"bgoodri","id":3386282,"avatar_url":"https://avatars2.githubusercontent.com/u/3386282?v=4","gravatar_id":"","url":"https://api.github.com/users/bgoodri","html_url":"https://github.com/bgoodri","followers_url":"https://api.github.com/users/bgoodri/followers","following_url":"https://api.github.com/users/bgoodri/following{/other_user}","gists_url":"https://api.github.com/users/bgoodri/gists{/gist_id}","starred_url":"https://api.github.com/users/bgoodri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgoodri/subscriptions","organizations_url":"https://api.github.com/users/bgoodri/orgs","repos_url":"https://api.github.com/users/bgoodri/repos","events_url":"https://api.github.com/users/bgoodri/events{/privacy}","received_events_url":"https://api.github.com/users/bgoodri/received_events","type":"User","site_admin":false},"created_at":"2018-05-18T20:09:49Z","updated_at":"2018-05-18T20:09:49Z","author_association":"CONTRIBUTOR","body":"If you specify the sample_file option and pars = \"\", then it is basically\nequivalent to running CmdStan.\n\nOn Fri, May 18, 2018 at 4:07 PM, Joshua Pritikin <notifications@github.com>\nwrote:\n\n> Ugh. I'm not keen on rewriting my scripts to use cmdstan, but it's a huge\n> waste of compute resources when rstan fails at the end of sampling so I\n> guess I have no choice? Or can I use rstan::read_stan_csv to read the\n> files produced by stan(..., sample_file)? Is there any diagnostic that I\n> will skip in my workflow by using rstan::read_stan_csv?\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/stan-dev/rstan/issues/528#issuecomment-390318234>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/ADOrqjCL2pe98vEU99N43tb9gWydIcE4ks5tzyoPgaJpZM4UEt2l>\n> .\n>\n"}}
{"actor":{"display_login":"bgoodri"}}