Skip to content

Commit

Permalink
Update documentation mentions of pRNG
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Mar 4, 2024
1 parent ab2fe11 commit 3fa8b04
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmdstan-guide/external_code.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ on their signatures if used in external C++.

- RNGs must end with `_rng`. They will be passed a "base RNG object" as the
second to last argument, before the pointer to the ostream. We recommend
making this a template, since it may change, but at the moment it is always a
`boost::random::ecuyer1988` object.
making this a template, since it may change. This is currently a
`stan::rng_t` object (a type alias to `boost::rng::mixmax`).
- Functions which edit the `target` directly must end with `_lp` and will be
passed a reference to `lp__` and a reference to a `stan::math::accumulator`
object as the final parameters before the ostream pointer. They are also
Expand Down
13 changes: 13 additions & 0 deletions src/reference-manual/reproducibility.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,16 @@ nice discussion of the issues and how to control reproducibility in
Intel's proprietary compiler by @CordenKreitzer:2014.


## Notable changes across versions

As noted above, there is no guarantee that the same results will be reproducible
between two different versions of Stan, even if the same settings and environment are used.

However, there are occassionally notable changes which would affect many if not all users,
and these are noted here. The absence of a version from this list still *does not*
guarantee exact reproducibility between it and other versions.

- Stan 2.28 changed the default chain ID for MCMC from `0` to `1`. Users who had set a seed
but not a chain ID would observe completely different outputs.
- Stan 2.35 changed the default pseudo-random number generator used by the Stan algorithms.
There is no relationship between seeds in versions pre-2.35 and version 2.35 and on.

0 comments on commit 3fa8b04

Please sign in to comment.