Initialization problems with cmdstan 2.28 (bug?)

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

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

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

1 Like

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

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

1 Like