Expecting RStan Issues With MacOS Big Sur?

OK. What is the R output of

Sys.getenv("PATH")

?

R> Sys.getenv(“PATH”)
[1] “/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/usr/local/git/bin:/opt/local/bin:/Applications/RStudio.app/Contents/MacOS/postback”
R>

And

Sys.which("clang++")

?

Blockquote

R> Sys.which(“clang++”)
clang++
“/usr/bin/clang++”

That looks like it should be fine. When you run

example("stan_model", package = "rstan", run.dontrun = TRUE)

do you get a mod object out at the end?

I seem to get an error as well as the mod object!

R> example(“stan_model”, package = “rstan”, 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
The NEXT version of Stan will not be able to pre-process your Stan program.
Please open an issue at
https://github.com/stan-dev/stanc3/issues
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().

stn_mdR> fit <- sampling(mod, data = list(y_mean = 0))

stn_mdR> fit2 <- sampling(mod, data = list(y_mean = 5))
Warning messages:
1: In system2(CXX, args = ARGS) : error in running command
2: In file.remove(c(unprocessed, processed)) :
cannot remove file ‘/var/folders/vz/g1j5pr8n7tg786zcwmv2dx8c0000gp/T//RtmpbtAKen/file6ee86bcb1a9d.stan’, reason ‘No such file or directory’
R> str(mod)
Formal class ‘stanmodel’ [package “rstan”] with 5 slots
…@ model_name : chr “16a540c6086086816528e4524def24d9”
…@ model_code : chr “data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}”
… …- attr(*, “model_name2”)= chr “16a540c6086086816528e4524def24d9”
…@ model_cpp :List of 2
… … model_cppname: chr "model6ee84954e160_16a540c6086086816528e4524def24d9" .. .. model_cppcode: chr “// Code generated by Stan version 2.21.0\n\n#include <stan/model/model_header.hpp>\n\nnamespace model6ee84954e1”| truncated
…@ mk_cppmodule:function (object)
…@ dso :Formal class ‘cxxdso’ [package “rstan”] with 7 slots
… … …@ sig :List of 1
… … … … file6ee83686dc9: chr(0) .. .. ..@ dso_saved : logi TRUE .. .. ..@ dso_filename: chr "file6ee83686dc9" .. .. ..@ modulename : chr "stan_fit4model6ee84954e160_16a540c6086086816528e4524def24d9_mod" .. .. ..@ system : chr "x86_64, darwin17.0" .. .. ..@ cxxflags : chr "CXXFLAGS = -Wall -g -O2 (LTO)"
… … …@ .CXXDSOMISC :<environment: 0x7f9a2c0e11d0>
R>

I am here to report that I have seen no issues with Big Sur (I still have the fixes that I did when upgrading to Catalina).

2 Likes

I don’t think you have any errors, just warnings that are fixed on GitHub.

Ok good to know.
Thank you for your help.

I just posted some benchmarks here

in summary it does seem to be fast.

1 Like