Thanks for digging into it! I didn't realize there were a couple other
checks there. I'll take a look and get that fixed.

Right now, diagnostic_recorder records everything. It's currently
duplicating a lot of things in memory, which I think we can cut down on.





On Sun, May 11, 2014 at 4:46 PM, maverickg <notifications@github.com> wrote:

> In rstan/rstan/inst/include/rstan/stan_fit.hpp:
>
> > -        for (std::vector<double>::iterator it = mean_pars.begin();
> > -             it != mean_pars.end();
> > -             ++it)
> > -          (*it) /= args.get_ctrl_sampling_iter_save_wo_warmup();
> > -      }
> > -      if (args.get_ctrl_sampling_refresh() > 0) {
> > -        rstan::io::rcout << std::endl;
> > -        outputter.print_timing(warmDeltaT, sampleDeltaT, &rstan::io::rcout);
> > +
> > +        size_t offset = sample_names.size() + sampler_names.size();
> > +        std::vector<double> cont_vector(mean_pars.size());
> > +        std::vector<int> disc_vector(0);
> > +        std::vector<double> pars;
> > +        for (size_t n = 0; n < args.get_ctrl_sampling_iter_save(); n++) {
> > +          for (size_t m = 0; m < mean_pars.size(); m++) {
> > +            cont_vector[m] = diagnostic_recorder.recorder2_.x()[offset + m][n];
>
> I think we need to change diagnostic_recorder here to sample_recorder(also for line 555). However, sample_recorder does not have all the
> parameters necessarily. We do not have the parameter values from the
> diagnostics, do we?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/stan-dev/rstan/pull/66/files#r12510664>
> .
>