Unfortunately, now I am encountering the problem discussed here:
in that stan::math::ChainableStack::memalloc_.free_all(); doesn’t seem to work anymore. If I comment it out my package will compile, but runtime ends up being far slower than it used to be. Does anyone know of a fix for the issue above?