stan-dev / rstan

RStan, the R interface to Stan
https://mc-stan.org
1.04k stars 265 forks source link

Unable to load #1059

Closed jenslevy closed 1 year ago

jenslevy commented 1 year ago

Summary:

I want to install Rstan on my Windows 10 laptop but after following the instructions that take one through several websites and which appear to be successful up until the last step, I am unable at the last to run the final "install.package("rstan", repos = "https://cloud.r-project.org/", dependencies = TRUE) step, apparently due to a memory problem. I would be very grateful for some guidance.

Description:

Following instructions from https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started, which referred me to "https://github.com/stan-dev/rstan/wiki/Configuring-C---Toolchain-for-Windows" in order to confure C++ Toolchain and then to https://cran.r-project.org/bin/windows/Rtools/rtools40.html to download the "jsonlite" packages. At the end of this I am unable to actually install RStan due to a "cc1plus.exe: out of memory allocating 65536 bytes" in spite of having 16 G of memore and allocating more memory to R.

Reproducible Steps:

I got a dialogue box that asked "Do you want to install from sources the package which needs compilation?" (which is a confusing question by the by) to which I said "yes".

After copius text I end up with copius output that ended with (see screen capture) : " Unable to install RStan which indicates "cc1plus.exe: out of memory allocating 65536 bytes" resulting in "ERROR: compilation failed for package 'rstan'".

An internet search suggested that this is an issue due to insufficient RAM. I have a 16G computer which I believe should be more than adequate. I try making sure that I have allocated enough memory by submitting "Sys.setenv(R_MAX_MEM_SIZE = "8G")".

R Version:

I am running R version 4.1.2 (2021-11-01)-- "Bird Hippie", through R Studio 2023.03.0 Build 386 "Cheery Blossom" Release.

Operating System:

Your operating system (e.g., Windows 10 Pro), x64-based PC

andrjohns commented 1 year ago

The current CRAN rstan cannot be installed from source on R 4.1.x.

You have three options:

andrjohns commented 1 year ago

I'm going to close this issue, but feel free to reopen if things still aren't working

jenslevy commented 1 year ago

Andrew, Thanks. I was able to get it installed and so far it appears to be working. Thanks for your help. Jens Jens W. Levy There are two kinds of people in this world: 1) Those who can extrapolate from incomplete data.

On Sun, Apr 16, 2023 at 11:34 PM Andrew Johnson @.***> wrote:

I'm going to close this issue, but feel free to reopen if things still aren't working

— Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/1059#issuecomment-1510479727, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK57JFHW3AR2BJ36RAQC2SDXBRJXDANCNFSM6AAAAAAWZFOBPY . You are receiving this because you authored the thread.Message ID: @.***>