Are there any anticipated compatibility issues between rstan and macOS Big Sur? I know macOS Catalina created issues so I don’t want to rush to upgrade.
Not completely related, but it would be interesting to know what Stan performance looks like on the new Apple ARM CPUs (for which Big Sur is the first supported macOS version).
Not a good omen
I have a spare machine I keep for emergencies and testing things. Sometime in next few days I’ll upgrade to Big Sur and try to install Stan
Thanks @jroon!
At the moment I cannot even install Big Sur - there is some major download glitch: https://www.macrumors.com/2020/11/12/macos-big-sur-download-issues/
I’ll try again tomorrow
Update:
I managed to download and update the machine to Big Sur 11.0.1. Then installed R 4.03 and the machine has Rstudio 1.2.5001 installed. Next I installed rstan and brms.
Good news! I was able to run basic example models from the help files of both packages without problems! I can try further models if people want and if I have time - but bear in mind this is a 2015 12" Macbook with 8Gb RAM - its doesn’t have power for big models!
I just accidentally upgraded to Mac OS Big Sur (yes, you can do that by accident if you click slightly too quickly…) and am happy that so far my RStan and CmdStanR seem to be working fine. I haven’t done any re-installation or setup; I just opened RStudio directly after rebooting my Mac and it seems to work. I hope that this is the norm, not the exception :-)
Runs fine on mine too.
Wondering this too. These machines seem to be blazing fast and even the MacbookAir has 8 cores.
Anyone here planning on getting one ?
Hi
Very novice Stan user.
Updated to Big Sur. Using R 4.03 and RStudio 1.3.959.
Now get the following error. Any help understanding and managing it would be appreciated.
library(StanHeaders)
library(Rcpp)
library(ggplot2)
library(rstan)
library(withr)
options(mc.cores = parallel::detectCores())
example(stan_model, run.dontrun = TRUE)
stn_mdR> stancode ← ‘data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}’
stn_mdR> mod ← stan_model(model_code = stancode, verbose = TRUE)
TRANSLATING MODEL ‘16a540c6086086816528e4524def24d9’ FROM Stan CODE TO C++ CODE NOW.
successful in parsing the Stan model ‘16a540c6086086816528e4524def24d9’.
sh: clang++ -mmacosx-version-min=10.13: command not found
error in running commandThe NEXT version of Stan will not be able to pre-process your Stan program.
Please open an issue at
Issues · stan-dev/stanc3 · GitHub
if you can share or at least describe your Stan program. This will help ensure that Stan
continues to work on your Stan programs in the future. Thank you!
This message can be avoided by wrapping your function call inside suppressMessages().
cannot remove file ‘/var/folders/vz/g1j5pr8n7tg786zcwmv2dx8c0000gp/T//Rtmp9cB1Vc/file2c866fd6798b.stan’, reason 'No such file or directory’COMPILING THE C++ CODE FOR MODEL ‘16a540c6086086816528e4524def24d9’ NOW.
OS: x86_64, darwin17.0; rstan: 2.21.1; Rcpp: 1.0.5; inline: 0.3.16
setting environment variables:
PKG_LIBS = /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/lib//libStanServices.a -L’/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/lib/’ -lStanHeaders -L’/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/lib/’ -ltbb -ltbbmalloc -ltbbmalloc_proxy
PKG_CPPFLAGS = -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp’ -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1
Program source :
So I’m not knowledgable enough to understand that error message. But it might be worth reinstalling all the relevant packages if you haven’t already done so. Worth a try anyhow!
Do you have XCode?
yes, downloaded the most recent version 12.2 ,2 days ago after getting Big Sur
And did you reinstall from scratch things using build from source?
I am running macOS 11 and do not (yet?) have any issues.
This may be the source of the problem. The missing libraries are as follows
'R> install.packages(c(“ggraph”, “RcppArmadillo”, “rstan”))
There are binary versions available but the source versions are later:
binary source needs_compilation
ggraph 2.0.3 2.0.4 TRUE
RcppArmadillo 0.10.1.0.0 0.10.1.2.0 TRUE
rstan 2.21.1 2.21.2 TRUE
Do you want to install from sources the packages which need compilation? (Yes/no/cancel) ’
I answered yes but get several pages of errors and can’t find the log file.At the end of the file is
"clang: error: no such file or directory: ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/lib//libStanServices.a’
make: *** [rstan.so] Error 1
ERROR: compilation failed for package ‘rstan’
- removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan’
- restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan’
Warning in install.packages :
installation of package ‘rstan’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/vz/g1j5pr8n7tg786zcwmv2dx8c0000gp/T/RtmpMt8rQ2/downloaded_packages’"
I would have chosen No. Also, check whether you have something in ~/.Renviron that set the PATH
environmental variable that should now be deleted.
I changed my reply to no.
I have nothing in my .Renviron file
.Rprofile shows
"options(prompt="R> ", digits=4, show.signif.stars=FALSE)
## local creates a new, empty environment
## This avoids polluting the global environment with
## the object r
local({
r = getOption("repos")
r["CRAN"] = "https://cran.rstudio.com/"
options(repos = r)
})
## WORKAROUND: https://github.com/rstudio/rstudio/issues/6692 for rstan
## Revert to 'sequential' setup of PSOCK cluster in RStudio Console on macOS and R 4.0.0
if (Sys.getenv("RSTUDIO") == "1" && !nzchar(Sys.getenv("RSTUDIO_TERM")) &&
Sys.info()["sysname"] == "Darwin") {
parallel:::setDefaultClusterOptions(setup_strategy = "sequential")
}"
So, did it install rstan 2.21.1 correctly?
I think rayan 2.21.1 is installed properly but I still get the following error
Blockquote
R> example(stan_model, run.dontrun = TRUE)
stn_mdR> stancode ← ‘data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}’
stn_mdR> mod ← stan_model(model_code = stancode, verbose = TRUE)
TRANSLATING MODEL ‘16a540c6086086816528e4524def24d9’ FROM Stan CODE TO C++ CODE NOW.
successful in parsing the Stan model ‘16a540c6086086816528e4524def24d9’.
sh: clang++ -mmacosx-version-min=10.13: command not found
error in running commandThe NEXT version of Stan will not be able to pre-process your Stan program.
Please open an issue at
Issues · stan-dev/stanc3 · GitHub
if you can share or at least describe your Stan program. This will help ensure that Stan
continues to work on your Stan programs in the future. Thank you!
This message can be avoided by wrapping your function call inside suppressMessages().
cannot remove file ‘/var/folders/vz/g1j5pr8n7tg786zcwmv2dx8c0000gp/T//RtmpbtAKen/file6ee833dd4339.stan’, reason 'No such file or directory’COMPILING THE C++ CODE FOR MODEL ‘16a540c6086086816528e4524def24d9’ NOW.
OS: x86_64, darwin17.0; rstan: 2.21.1; Rcpp: 1.0.5; inline: 0.3.16
setting environment variables:
PKG_LIBS = /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/lib//libStanServices.a -L’/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/lib/’ -lStanHeaders -L’/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/lib/’ -ltbb -ltbbmalloc -ltbbmalloc_proxy
PKG_CPPFLAGS = -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppParallel/include/" -I"/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DBOOST_NO_AUTO_PTR -include ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp’ -D_REENTRANT -DRCPP_PARALLEL_USE_TBB=1
Blockquote