stan-dev / cmdstan

CmdStan, the command line interface to Stan
https://mc-stan.org/users/interfaces/cmdstan
BSD 3-Clause "New" or "Revised" License
210 stars 93 forks source link

order of checks for "fixed_param" "num_warmup" #1276

Closed mitzimorris closed 3 months ago

mitzimorris commented 3 months ago

Summary:

The logic for checking combination of parameters could to a better job of detecting models w/ no params and not complain if user requests "num_warmup=0" w/out requirement "adapt engaged=false".

Description:

In file command.hpp, add check for model w/ 0 params to line 565, as in line 574.

https://github.com/stan-dev/cmdstan/blob/509cb59601f1423096da6f9502278500de1438a2/src/cmdstan/command.hpp#L565-L574

Reproducible Steps:

run any Stan program w/out a model block, specify num_warmup=0, and it will error.

Current Output:

error message:

The number of warmup samples (num_warmup) must be greater than zero if adaptation is enabled.

Expected Output:

Should just run.

Current Version:

v2.35.0