Skip to content

Doc Fix? Setting STAN_THREADS=false (or FALSE, 0, etc) results in STAN_THREADS=true #1293

@katrinabrock

Description

@katrinabrock

Summary:

As concisely stated in this comment: #1179 (comment)

Most of our makefile logic just checks if STAN_THREADS is defined, not that it is set to a "truthy" value.

However, the documentation does not explicitly state this, leading users (including apparently cmdstanr developers) to incorrectly infer that falsy values will turn off multi-threading.

Description:

Not sure if the behavior should change or the doc should change here, but certainly if the behavior remains as-is, it would be good to make the doc more explicit. This issue likely impacts other flags as well.

It would also be helpful for make help-dev or a similar command to resolve the value to how it will be interpreted at compile time.

Reproducible Steps:

~/.cmdstan/cmdstan-2.35.0$ STAN_THREADS=false make examples/bernoulli/bernoulli
~/.cmdstan/cmdstan-2.35.0$ examples/bernoulli/bernoulli info|grep STAN_THREADS

Current Output:

STAN_THREADS=true

Expected Output:

STAN_THREADS=false

Current Version:

v2.35.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions