Summary:
When algorithm=fixed_param (either implicitly as is being removed in #1054 or explicitly) and num_chains is set to a value other than 1, multiple files are created but only the first contains any draws.
Reproducible Steps:
Model:
data {
int<lower=0> N;
real<lower=0,upper=1> theta;
}
generated quantities {
int theta_rep = 0;
for (n in 1:N)
theta_rep += bernoulli_rng(theta);
}
data:
{
"N":300,
"theta": 0.3
}
command:
./bernoulli_datagen sample num_chains=7 algorithm=fixed_param data file=data.json
Current Output:
Files output_#.csv for 1 to 7. File 1 contains draws, remainder contain only the CmdStan header comment with no csv data.
Expected Output:
Either this should produce an error or each file should contain draws
Additional Information:
Related:
stan-dev/cmdstanpy#495
Current Version:
v2.28.1