That means the compiler and Stan installation are all working well, so the issue is elsewhere.
Looking at the original error, it looks like it only ran out of memory by ~15mb. This can happen if you’re compiling multiple models simultaneously, with each model taking ~2-3gb.
Hm, I’m afraid I’m not sure what the issue is then. If your compiler and RStan installation are working without issue, it might have something to do with the rstanarm installation itself.
@bgoodri I know the error message says it’s out of memory but if @sea83 really has 32gb of RAM then how is that possible? That’s double what I have and I don’t have RAM issues compiling rstanarm from source. Does it use a lot more memory on windows than mac for some reason?
It installed after uninstalling and re-installing many other packages like ‘glue’, ‘ps’, etc. But did not have ‘stan_surv’ function in the end.
There was a warning too:
Warning message:
In utils::untar(tarfile, ...) :
‘tar.exe -xf "C:\Users\z3529455\AppData\Local\Temp\RtmpstuJZu\file755416331bd.tar.gz" -C "C:/Users/z3529455/AppData/Local/Temp/RtmpstuJZu/remotes75543a041272"’ returned error code 1
did not install with this error: installation of package ‘rstanarm’ had non-zero exit status.
Here is the error:
Error: Failed to install 'rstanarm' from GitHub:
(converted from warning) installation of package ‘C:/Users/z3529455/AppData/Local/Temp/RtmpstuJZu/file75541be324a9/rstanarm_2.19.1.tar.gz’ had non-zero exit status
In addition: Warning message:
In utils::untar(tarfile, ...) :
‘tar.exe -xf "C:\Users\z3529455\AppData\Local\Temp\RtmpstuJZu\file7554777d77a3.tar.gz" -C "C:/Users/z3529455/AppData/Local/Temp/RtmpstuJZu/remotes7554f9c35f"’ returned error code 1
Then, I decided to update my R and Rtools version to see it makes anything better; however, again I got errors which were related to memory. that is:
cc1plus.exe: out of memory allocating 5401568 bytes
make: *** [C:/Users/z3529455/DOCUME~1/R/R-40~1.1/etc/i386/Makeconf:227: stan_files/jm.o] Error 1
rm stan_files/jm.cc stan_files/binomial.cc stan_files/lm.cc stan_files/continuous.cc stan_files/bernoulli.cc stan_files/polr.cc stan_files/surv.cc stan_files/count.cc stan_files/mvmer.cc
ERROR: compilation failed for package 'rstanarm'
* removing 'C:/Users/z3529455/Documents/R/R-4.0.1/library/rstanarm'
Error: Failed to install 'rstanarm' from GitHub:
(converted from warning) installation of package ‘C:/Users/z3529455/AppData/Local/Temp/Rtmpg3xybY/file6cc4199c7231/rstanarm_2.19.1.tar.gz’ had non-zero exit status
In addition: Warning message:
In utils::untar(tarfile, ...) :
‘tar.exe -xf "C:\Users\z3529455\AppData\Local\Temp\Rtmpg3xybY\file6cc445597d5d.tar.gz" -C "C:/Users/z3529455/AppData/Local/Temp/Rtmpg3xybY/remotes6cc4cbd2c7c"’ returned error code 1
Just contributing that I have experienced a similar error, while compiling the Rstan Stan_Surv feature.
It sounds like it cannot be solved at the moment - and if 32 gb RAM machine cannot compile, than I assume it must be a Windows CCplus1 issue. I had tried playing with the TAR permissions, since Windows has issues with permissions. This did not seem to help. I downgraded StanHeaders, which did not help. I did a full clean install of RStudio and R, as well as cleared my Rprofile. I had errors, too, on my Fedora machine, but I did not rigorously document them. Happy to share all the steps I tried, but not much help since I could not get it to compile.
Good day,
I am coming to this thread a bit late. But, I have followed it through. I’d like to add my experience. I am on a 64GB RAM PC with windows 10 and I am likewise experiencing the memory error when I attempt to load the development version of rstanarm. I have tried every suggestion in this thread. Nothing seems to help.
Nonetheless, thanks for taking the time to troubleshoot this.
Hello,
I read all the posts here regarding rstanarm from development but I still have a problem. I wan to use stan_surv () function and installed rstanarm from CRAN but the function I snot available from CRAN, I tried to follow all advice to install from Github but got the error as below:
Error: Failed to install 'rstanarm' from GitHub:
(converted from warning) installation of package ‘C:/~/AppData/Local/Temp/1/Rtmpuy64W3/fileb0acb7a21d8/rstanarm_2.21.2.tar.gz’ had non-zero exit status
Would you kindly advise the right way without getting an error to have stan_surv() working?
Thanks
@rok_cesnovar
While this worked on PC, it does not work on cluster or cloud, is there a different approach to download this on Linux, and cluster server?
Thanks