Open
Description
Several things about enabling TBB and OpenCL are incredibly confusing and documented nowhere:
- If STAN_OPENCL or STAN_THREADS are set, they will be enabled regardless of the cpp_options in the compile() function. (I believe this even holds true when they are set to anything (true or false) in the makefile, but am not 100% firm on that.)
- The CmdStanModel$cpp_options() returns STAN_OPENCL and STAN_THREADS set to TRUE no matter what is set in the makefile. The actual cpp_options in the compile() function do not change the reported values, although they do work for changing the actual application of either option.
- When the cpp_options are changed, the model is not recompiled automatically via the same mechanism that recompiles if the model file changed.
I'm mostly sure that this is the actual behavior on my machine, but I may have forgotten to recompile the model at some point.