fix standalone gqs rng seed use - #1347
Conversation
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
WardBrian
left a comment
There was a problem hiding this comment.
Looks good, one small request before merging
Co-authored-by: Brian Ward <bward@flatironinstitute.org>
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
cmdstan part of fixing stan-dev/stan#3401
This PR does not compile without stan-dev/stan#3401 merged!
Making the fix and PR text were assisted by Claude
Submisison Checklist
./runCmdStanTests.py src/testSummary:
stan-dev/stan#3402 adds the chain-id parameter to
stan::services::standalone_generate. This PR forwards CmdStan's existingidargument insrc/cmdstan/command.hpp.Intended Effect:
id=offsets the RNG forgenerate_quantitiesexactly as it does forsample, so parallel GQ chains launched as separate processes no longershare a random number stream.
How to Verify:
./runCmdStanTests.py src/test/interface/generated_quantities_test.cppNew test
generate_quantities_chain_id_rng: two runs ofbern_gq_modelon the same
fitted_params, differing only inid, must not produceidentical CSV bodies. It fails on develop and passes with this PR plus
stan-dev/stan#3402.
Side Effects:
Output of multi-process standalone generated quantities runs changes (to correct behavior)
Documentation:
Existing documentation matches the desired behavior.
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Aki Vehtari
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: