I'm trying installing rstan using install.packages('rstan')
It gets laggy and then automatically closes Rstudio. I have tried install.packages(c("BH", "StanHeaders", "Rcpp", "RcppEigen", "RcppParallel", "inline", "loo", "pkgbuild"))
but that didn't help.
The multiple packages were successfully installed. So it's jut the rstan package makes Rstudio close (and also Firefox while I was browsing the web). Could you tell me how to check how much memory is being used for Rstudio and how to increase the amount? I'm using Ubuntu 22.04
The amount of memory used you always can find in the memory report in the RStudio IDE (top right part of the IDE in the Environment/History/... part.
Unless you set any limitations on the system side or add limits into local launcher or even use SLURM launcher, RStudio will consume all the memory it can get before running out of it and then the so-called OOM will kill the process that consumes the most of memory - this is when RStudio will close according to my theory.
As a next step, can you please open a terminal in the RStudio IDE (Alternatively log into your ubuntu 22.04 server via ssh), type the following commands
curl -O https://mc-stan.org/r-packages/src/contrib/rstan_2.26.22.tar.gz
R CMD INSTALL rstan_2.26.22.tar.gz
and send the output ? (If the second command complains about "R not found" you may need to specify the full path to the R binary (e.g. /opt/R/4.2.3/bin/R)
I ended up successfully installing rstan in my Ubuntu termial (not in the Rstudio terminal). Does that suggest anything? I tried your commands and it told me
sudo snap install curl # version 8.1.2, or
sudo apt install curl # version 7.81.0-1ubuntu1.13
See 'snap info curl' for additional versions.
Warning: invalid package ‘rstan_2.26.22.tar.gz’
Error: ERROR: no packages specified
I also navigated to Environment tab, pressed Free unused memory and I got this
gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 2715225 145.1 4524922 241.7 4524922 241.7
Vcells 5064424 38.7 10146329 77.5 7437365 56.8
clicked the Memory usage report, I got
Can you see and instruct me next steps? I still want it smoother, I compiled a model and Rstudio closes again.