# Initialization problems with cmdstan 2.28 (bug?)

**URL:** <https://discourse.mc-stan.org/t/initialization-problems-with-cmdstan-2-28-bug/24924>\
**Category:** Developers\
**Tags:** cmdstan\
**Created:** [October 20, 2021, 5:17pm UTC](https://discourse.mc-stan.org/t/initialization-problems-with-cmdstan-2-28-bug/24924 "2021-10-20T17:17:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsocolar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jsocolar/32/2486_2.png) [@jsocolar](https://discourse.mc-stan.org/u/jsocolar)\
**Post date:** [October 20, 2021, 5:17pm UTC](https://discourse.mc-stan.org/t/initialization-problems-with-cmdstan-2-28-bug/24924/1 "2021-10-20T17:17:58Z")

</div>

Hi all,  
I’m fitting a model with `cmdstanr` using user-supplied inits (fit via `brms`). Under `cmdstan 2.27.0`, everything works fine. But if I recompile under `cmdstan 2.28.0` I error with

```
Chain 1 Rejecting initial value:
Chain 1 Error evaluating the log probability at the initial value.
Chain 1 Exception: lb_free: Lower bounded variable[1] is -0.426018, but must be greater than or equal to 0.000000 (found before start of program)
Chain 1 Exception: lb_free: Lower bounded variable[1] is -0.426018, but must be greater than or equal to 0.000000 (found before start of program)
Chain 1 Initialization between (-2, 2) failed after 1 attempts. 
Chain 1 Try specifying initial values, reducing ranges of constrained values, or reparameterizing the model.

```

If I switch back to `2.27` I’ll get the same error unless I force recompilation, in which case everything goes back to working as before. If I then switch back to 2.28, everything works fine _until_ I force recompilation, in which case I again see the same errors.

This behavior is consistent across two different computers (both macs, one M1 and one X-86).

I’m working on a useful reprex, which I will post here in a bit, but in the meantime does this look familiar to anybody? @rok_cesnovar

Cheers  
Jacob

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [October 20, 2021, 5:20pm UTC](https://discourse.mc-stan.org/t/initialization-problems-with-cmdstan-2-28-bug/24924/2 "2021-10-20T17:20:22Z")

</div>

> [@jsocolar](#):
>
> I’m working on a useful reprex, which I will post here in a bit, but in the meantime does this look familiar to anybody? @rok_cesnovar

Yeah, this is a known issue in the 2.28 release, which is why there will be a 2.28.1 tomorrow in all likelihood. The issue created and since closed is here: [Issue with simplex\_free in 2.28.0 · Issue #992 · stan-dev/stanc3 · GitHub](https://github.com/stan-dev/stanc3/issues/992)

Until you force recompilation it will keep using the old model built with the previously used version cmdstan.

---

<div class="post-metadata">

**Author:** ![jsocolar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/jsocolar/32/2486_2.png) [@jsocolar](https://discourse.mc-stan.org/u/jsocolar)\
**Post date:** [October 20, 2021, 5:23pm UTC](https://discourse.mc-stan.org/t/initialization-problems-with-cmdstan-2-28-bug/24924/3 "2021-10-20T17:23:35Z")

</div>

Thanks @rok_cesnovar! I didn’t think to check the stanc3 repo for an issue. Sorry for the clutter!

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [October 20, 2021, 5:25pm UTC](https://discourse.mc-stan.org/t/initialization-problems-with-cmdstan-2-28-bug/24924/4 "2021-10-20T17:25:29Z")

</div>

No problem at all. Sorry for the troubles. I marked my answer as the solution so we know this one was resolved.
