Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with changes in Stan RNG type #1152

Open
andrjohns opened this issue Jan 22, 2025 · 1 comment
Open

Compatibility with changes in Stan RNG type #1152

andrjohns opened this issue Jan 22, 2025 · 1 comment

Comments

@andrjohns
Copy link
Contributor

For the 2.32 -> 2.36+ transition, we need to account for the changes in Stan's rng otherwise CRAN rstan won't build against the next StanHeaders:

Module.cpp:106:21: error: no viable conversion from 'rng_t' (aka 'mixmax_engine<17, 36, 0>') to 'boost::ecuyer1988' (aka 'additive_combine_engine<linear_congruential_engine<unsigned int, 40014, 0, 2147483563>, linear_congruential_engine<unsigned int, 40692, 0, 2147483399>>')
  106 |   boost::ecuyer1988 rng = stan::services::util::create_rng(random_seed, id);
      |                     ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We could workaround this with some very minor changes: diff against CRAN rstan

@bgoodri @hsbadr do those seem reasonable to add as an update to CRAN?

@bgoodri
Copy link
Contributor

bgoodri commented Jan 22, 2025

I think so. Stan changing the RNG is probably going to cause a lot of unit test failures in packages that test whether the average of a finite number of MCMC draws is within tolerance of an arbitrary number, but we will just have to open a bunch of PRs about that.

In addition, it seems that Stan-related packages sometimes but not always have build problems under clang++ when configured to use the C23 standard in addition to the C++17 standard. I don't really know why that is happening yet, but we are going to have to figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants