stan-dev / stan-dev/cmdstan

Expected? cmdstan considers binary up-to-date when make is run with different build args

Open
#1,294 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
238
Forks
106
Avg merge
2h 29m
Merged PRs (30d)
6

Description

Summary:

cmdstan does not automatically recompile a model when build args change. If this is expected, would be good to document.

Description:

Doc states

If the you call Make with target bernoulli twice in a row, without any editing bernoulli.stan or otherwise changing the system, on the second invocation, Make will determine that the executable is already newer than the Stan source file and will not recompile the program:

It's unclear whether changing a build arg such as STAN_THREADS or STAN_OPENCL constitutes "otherwise changing the system". Would be good to clarify this.

Reproducible Steps:
make examples/bernoulli/bernoulli
STAN_THREADS=true make examples/bernoulli/bernoulli

I got the same behavior editing make/local.

Current Output:
make: 'examples/bernoulli/bernoulli' is up to date.
Expected Output:

Describe what you expect the output to be. Knowing the correct behavior is also very useful.

Additional Information:

Related cmdstanr discussions:
https://github.com/stan-dev/cmdstanr/issues/1019
https://github.com/stan-dev/cmdstanr/pull/1022

Current Version:

v2.35.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CmdStan Guide's compiling Stan programs section at the dependencies anchor, then run the two bernoulli make commands from the issue and compare the behavior after editing make/local. Clarify whether changes to STAN_THREADS, STAN_OPENCL, or make/local should trigger recompilation, and document the expected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, cli
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.