From 3fa8b04095ba04a723cd50b3b6be05f830a2ec12 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Wed, 14 Feb 2024 11:57:13 -0500 Subject: [PATCH] Update documentation mentions of pRNG --- src/cmdstan-guide/external_code.qmd | 4 ++-- src/reference-manual/reproducibility.qmd | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/cmdstan-guide/external_code.qmd b/src/cmdstan-guide/external_code.qmd index 26393f4bc..4df679ef3 100644 --- a/src/cmdstan-guide/external_code.qmd +++ b/src/cmdstan-guide/external_code.qmd @@ -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 diff --git a/src/reference-manual/reproducibility.qmd b/src/reference-manual/reproducibility.qmd index 32b3632df..c36eb7540 100644 --- a/src/reference-manual/reproducibility.qmd +++ b/src/reference-manual/reproducibility.qmd @@ -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.