Cellar bin clang6 clang8 f-secure include man remotedesktop texlive
Homebrew clang4 clang7 etc gfortran lib opt share var
See anything wrong?
Interestingly, I restarted R and removed the saved Stan model (.rds file) again. This time when running it tells me Building R package from source requires installation of additional build tools. Do you want ot install the additional tools now?
Since I had removed the .rds files before posting here, this change must have come from updating the Makevars file with @bgoodri 's post. Any ideas what I’m missing now? xcode-select --install tells me the command line tools are already installed.
Apparently I was a bit sloppy. When removing the flags from @bgoodri’s post from Makevars, I still have R ask me to install additional build tools as soon as I start compiling a Stan model. Not sure why this happens, as it didn’t happen before.
Not a screenshot but hopefully this works for you:
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type ‘license()’ or ‘licence()’ for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type ‘contributors()’ for more information and
‘citation()’ on how to cite R or R packages in publications.
Type ‘demo()’ for some demos, ‘help()’ for on-line help, or
‘help.start()’ for an HTML browser interface to help.
Type ‘q()’ to quit R.
This is the output:
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.1
I did some Googling and was able to find what was wrong with my setup. Then I restarted my computer and reran the model from before and all chains are sampling now. Thanks @bgoodri, @coatless and @wds15 for your help with this!
Ok not a specific Catalina question here but as I’m thinking to buy a new macbook pro - going forward will Stan GPU acceleration continue to work on Mac now that day have deprecated OpenCl in favour of Metal2?
I hope this question isn’t out of place here I didnt’ think it merited a new thread.
The question is really out of place here… but to my understanding is that its very uncertain that GPU support will be there on Mac in the future given that OpenCL support is dropped. The hope is to find some adaptor software which handles this though. There are some discussions scattered on the forum.
I think Sebastian mostly answered your question. Just to add a bit more context, though this might be a bit offtopic.
The only currently supported compute language on recent MacOSes is Metal. The only other non-fully-experimental way of doing GPU computing on a Mac is using Vulkan Compute and then translating that to metal with MoltenVK.
There is no OpenCL support as well as no CUDA support. Well NVIDIA GPUs dont even have drivers for Macs. There is an experimental translator from OpenCL to Vulkan which could then be tranlslate to Metal. But that all seems very bizzare.
The bigger isssue is that Metal has no double-precision floating point support which makes is really not suitable for Stan.
The only real hope for Stan GPU on a Mac is that Apple adds back suport for OpenCL or that they add support for OpenCL-Next or SYCL or even CUDA in the future.
Hello! I am trying to run rstanarm on my MacBook Pro (Catalina). I appear to be running into the same issues listed in forums previously, but can’t make any of the suggested fixes fix my problem. I have downloaded and successfully installed the latest installer, updated R, RStudio, and my Mac (running 10.15.1), and restarted, re-downloaded, and rebooted as suggested. When running stan_lmer, I still come up with the same error message after the first chain:
[1] “Error in sampler$call_sampler(args_list[[i]]) : "
[2] " c++ exception (unknown reason)”
error occurred during calling the sampler; sampling not done
And then at the close of several failed chains:
[[4]]
Stan model ‘continuous’ does not contain samples.
Error in check_stanfit(stanfit) :
Invalid stanfit object produced please report bug
In addition: Warning messages:
1: In .local(object, …) :
some chains had errors; consider specifying chains = 1 to debug
2: In .local(object, …) :
some chains had errors; consider specifying chains = 1 to debug
Error in dimnamesGets(x, value) :
invalid dimnames given for “dgCMatrix” object
Any help you can offer would be greatly appreciated. My code and example code works just fine on my PC. Thanks so much for your time. -Amy
Thanks Ben- unfortunately, both rstan and rstanarm are indeed installed from source. I just re-installed again just to be sure, but receive the same error.
Hey guys - this thread has become very confusing for those of us dealing with this issue for the first time. There are a lot of recommended code snippets, but its very hard to tell what makes them different from each other, or whether any of them are worth trying at this point, etc.
Since this is a widespread issue, I want to suggest that it would be helpful for the community if someone knowledgeable put up a page, perhaps on the git, explaining the situation, and describing the current state of potentially effective workarounds, if there are any.
(BTW - the same issue arises with llvm9 installed by homebrew.)
The one at the top post is the recommended one when compiling your own Stan programs. We still don’t know what to do about packages that come with Stan models because the way they are linked on CRAN does not work when the user has Catalina.
@bgoodri The advice at the top of the thread (use the coatless installer to point the C include flags to XCode) did not fix building Stan models for me. (Possibly because XCode has been updated since R was compiled? Perhaps it would make sense to experiment with different XCode versions?) I think several other people have given the same comment.
Just to be clear - I’m not saying the new XCode broke the fix. I’m just saying the fix didn’t work for me. The new XCode version was a guess about a possible cause. There seem to be other people in this and the other thread saying that the fix didn’t work.