Skip CmdStan check for exe files
Is your feature request related to a problem? Please describe.
Hi, thanks for this project!
I'd like to load/run a precompiled model without CmdStan being installed.
library(cmdstanr)
model <- cmdstan_model(exe_file="bernoulli")
However, this currently fails with:
Error: CmdStan path has not been set yet. See ?set_cmdstan_path.
Describe the solution you'd like
No error with the code above, like with CmdStanPy
from cmdstanpy import CmdStanModel
model = CmdStanModel(exe_file='bernoulli')
Describe alternatives you've considered
I tried setting the path to a non-existent path (to hack around this), but it fails as well.
Hey @ankane,
we can definitely remove this constraint (having to have cmdstan installed), the problem is that we would then need to make sure that the user does have a system-installed TBB. Because otherwise, this won't work - we dynamically link TBB to the CmdStan executable.
If we have a simple way of checking whether the user has system TBB installation, I agree that we should do this.
Thanks for the quick response @rok-cesnovar. I think the simplest and least error-prone way would be to run the program (since the linked TBB could be in any location).
If you still wanted to support friendly error messages, you could check any errors to see if they're TBB-related and show a custom error message (I've taken a similar approach in Ruby with libomp with some of my projects).