Skip to content

Make compile(..., cpp_options()) consistent with makefile options #1019

Open
@mippeqf

Description

@mippeqf

Several things about enabling TBB and OpenCL are incredibly confusing and documented nowhere:

  1. 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.)
  2. 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.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions