Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
katrinabrock opened this issue Aug 21, 2024 · 1 comment

Comments

@katrinabrock
Copy link

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:
stan-dev/cmdstanr#1019
stan-dev/cmdstanr#1022

Current Version:

v2.35.0

@WardBrian
Copy link
Member

This is a known bug that is basically not fixable when using make.

There are some ways you can hack around it, and we have some half-attempts at doing so (for example, on a clean install, the example you gave should trigger a rebuild the first time...) but the "right" way to do this is to use a different build system entirely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants