From bb1ff9d162df088bc04d6497ee7865e1139ac54b Mon Sep 17 00:00:00 2001 From: Mitzi Morris Date: Sat, 16 Sep 2023 17:41:42 -0400 Subject: [PATCH] unit tests passing --- src/stan/services/sample/fixed_param.hpp | 2 +- .../sample/hmc_nuts_dense_e_adapt.hpp | 2 +- .../services/sample/hmc_nuts_diag_e_adapt.hpp | 17 +- .../services/sample/hmc_nuts_unit_e_adapt.hpp | 9 +- ...nuts_dense_e_adapt_parallel_match_test.cpp | 18 +- ..._nuts_diag_e_adapt_parallel_match_test.cpp | 4 +- .../hmc_nuts_unit_e_adapt_parallel_test.cpp | 45 ++++- .../sample/hmc_nuts_unit_e_parallel_test.cpp | 174 ++++++++---------- .../util/generate_transitions_test.cpp | 4 +- .../unit/services/util/mcmc_writer_test.cpp | 2 +- 10 files changed, 145 insertions(+), 132 deletions(-) diff --git a/src/stan/services/sample/fixed_param.hpp b/src/stan/services/sample/fixed_param.hpp index a7b9816866..9ae96e6fd9 100644 --- a/src/stan/services/sample/fixed_param.hpp +++ b/src/stan/services/sample/fixed_param.hpp @@ -140,7 +140,7 @@ int fixed_param(Model& model, const std::size_t num_chains, } std::vector rngs; std::vector cont_vectors; - std::vector dummy_metric_writers; + std::vector dummy_metric_writers; std::vector writers; std::vector samples; std::vector samplers(num_chains); diff --git a/src/stan/services/sample/hmc_nuts_dense_e_adapt.hpp b/src/stan/services/sample/hmc_nuts_dense_e_adapt.hpp index 596a95824a..6285208735 100644 --- a/src/stan/services/sample/hmc_nuts_dense_e_adapt.hpp +++ b/src/stan/services/sample/hmc_nuts_dense_e_adapt.hpp @@ -631,7 +631,7 @@ int hmc_nuts_dense_e_adapt( unit_e_metric.emplace_back(std::make_unique( util::create_unit_e_dense_inv_metric(model.num_params_r()))); } - std::vector dummy_metric_writer; + std::vector dummy_metric_writer; dummy_metric_writer.reserve(num_chains); for (size_t i = 0; i < num_chains; ++i) { dummy_metric_writer.emplace_back(stan::callbacks::structured_writer()); diff --git a/src/stan/services/sample/hmc_nuts_diag_e_adapt.hpp b/src/stan/services/sample/hmc_nuts_diag_e_adapt.hpp index 8ffc1f8656..76785b651b 100644 --- a/src/stan/services/sample/hmc_nuts_diag_e_adapt.hpp +++ b/src/stan/services/sample/hmc_nuts_diag_e_adapt.hpp @@ -336,7 +336,8 @@ int hmc_nuts_diag_e_adapt( * @return error_codes::OK if successful */ template + typename InitWriter, typename SampleWriter, typename DiagnosticWriter, + typename MetricWriter> int hmc_nuts_diag_e_adapt( Model& model, size_t num_chains, const std::vector& init, const std::vector& init_inv_metric, @@ -349,7 +350,7 @@ int hmc_nuts_diag_e_adapt( std::vector& init_writer, std::vector& sample_writer, std::vector& diagnostic_writer, - std::vector& metric_writer) { + std::vector& metric_writer) { if (num_chains == 1) { return hmc_nuts_diag_e_adapt( model, *init[0], *init_inv_metric[0], random_seed, init_chain_id, @@ -470,7 +471,7 @@ int hmc_nuts_diag_e_adapt( std::vector& init_writer, std::vector& sample_writer, std::vector& diagnostic_writer) { - std::vector dummy_metric_writer; + std::vector dummy_metric_writer; dummy_metric_writer.reserve(num_chains); for (size_t i = 0; i < num_chains; ++i) { dummy_metric_writer.emplace_back(stan::callbacks::structured_writer()); @@ -499,9 +500,10 @@ int hmc_nuts_diag_e_adapt( * @tparam Model Model class * @tparam InitContextPtr A pointer with underlying type derived from * `stan::io::var_context` + * @tparam InitWriter A type derived from `stan::callbacks::writer` * @tparam SamplerWriter A type derived from `stan::callbacks::writer` * @tparam DiagnosticWriter A type derived from `stan::callbacks::writer` - * @tparam InitWriter A type derived from `stan::callbacks::writer` + * @tparam MetricWriter A type derived from `stan::callbacks::structured_writer` * @param[in] model Input model (with data already instantiated) * @param[in] num_chains The number of chains to run in parallel. `init`, * `init_writer`, `sample_writer`, and `diagnostic_writer` must be the same @@ -540,7 +542,8 @@ int hmc_nuts_diag_e_adapt( * @return error_codes::OK if successful */ template + typename SampleWriter, typename DiagnosticWriter, + typename MetricWriter> int hmc_nuts_diag_e_adapt( Model& model, size_t num_chains, const std::vector& init, unsigned int random_seed, unsigned int init_chain_id, double init_radius, @@ -552,7 +555,7 @@ int hmc_nuts_diag_e_adapt( std::vector& init_writer, std::vector& sample_writer, std::vector& diagnostic_writer, - std::vector& metric_writer) { + std::vector& metric_writer) { std::vector> unit_e_metric; unit_e_metric.reserve(num_chains); for (size_t i = 0; i < num_chains; ++i) { @@ -640,7 +643,7 @@ int hmc_nuts_diag_e_adapt( unit_e_metric.emplace_back(std::make_unique( util::create_unit_e_diag_inv_metric(model.num_params_r()))); } - std::vector dummy_metric_writer; + std::vector dummy_metric_writer; dummy_metric_writer.reserve(num_chains); for (size_t i = 0; i < num_chains; ++i) { dummy_metric_writer.emplace_back(stan::callbacks::structured_writer()); diff --git a/src/stan/services/sample/hmc_nuts_unit_e_adapt.hpp b/src/stan/services/sample/hmc_nuts_unit_e_adapt.hpp index ed7d3b540b..47b5a33afe 100644 --- a/src/stan/services/sample/hmc_nuts_unit_e_adapt.hpp +++ b/src/stan/services/sample/hmc_nuts_unit_e_adapt.hpp @@ -146,8 +146,7 @@ int hmc_nuts_unit_e_adapt( * @tparam InitWriter A type derived from `stan::callbacks::writer` * @tparam SamplerWriter A type derived from `stan::callbacks::writer` * @tparam DiagnosticWriter A type derived from `stan::callbacks::writer` - * @tparam Stream A type with with a valid `operator<<(std::string)` - * @tparam Deleter A class with a valid `operator()` method for deleting the + * @tparam MetricWriter A type derived from `stan::callbacks::structured_writer` * @param[in] model Input model (with data already instantiated) * @param[in] num_chains The number of chains to run in parallel. `init`, * `init_inv_metric`, `init_writer`, `sample_writer`, and `diagnostic_writer` @@ -181,7 +180,7 @@ int hmc_nuts_unit_e_adapt( * @return error_codes::OK if successful */ template + typename SampleWriter, typename DiagnosticWriter, typename MetricWriter> int hmc_nuts_unit_e_adapt( Model& model, size_t num_chains, const std::vector& init, unsigned int random_seed, unsigned int init_chain_id, double init_radius, @@ -192,7 +191,7 @@ int hmc_nuts_unit_e_adapt( std::vector& init_writer, std::vector& sample_writer, std::vector& diagnostic_writer, - std::vector& metric_writer) { + std::vector& metric_writer) { if (num_chains == 1) { return hmc_nuts_unit_e_adapt( model, *init[0], random_seed, init_chain_id, init_radius, num_warmup, @@ -298,7 +297,7 @@ int hmc_nuts_unit_e_adapt( std::vector& init_writer, std::vector& sample_writer, std::vector& diagnostic_writer) { - std::vector dummy_metric_writer; + std::vector dummy_metric_writer; dummy_metric_writer.reserve(num_chains); for (size_t i = 0; i < num_chains; ++i) { dummy_metric_writer.emplace_back(stan::callbacks::structured_writer()); diff --git a/src/test/unit/services/sample/hmc_nuts_dense_e_adapt_parallel_match_test.cpp b/src/test/unit/services/sample/hmc_nuts_dense_e_adapt_parallel_match_test.cpp index f5365b2e27..4334bb96a9 100644 --- a/src/test/unit/services/sample/hmc_nuts_dense_e_adapt_parallel_match_test.cpp +++ b/src/test/unit/services/sample/hmc_nuts_dense_e_adapt_parallel_match_test.cpp @@ -1,7 +1,7 @@ #include -#include #include #include +#include #include #include #include @@ -44,8 +44,6 @@ class ServicesSampleHmcNutsDenseEAdaptParMatch : public testing::Test { for (int i = 0; i < num_chains; ++i) { ss_metric[i].str(std::string()); ss_metric[i].clear(); - metrics[i].begin_record(); - metrics[i].end_record(); } } @@ -60,7 +58,8 @@ class ServicesSampleHmcNutsDenseEAdaptParMatch : public testing::Test { = stan::callbacks::unique_stream_writer; std::vector par_parameters; std::vector seq_parameters; - std::vector metrics; + std::vector> + metrics; std::vector diagnostics; std::vector> context; std::unique_ptr model; @@ -125,12 +124,11 @@ TEST_F(ServicesSampleHmcNutsDenseEAdaptParMatch, single_multi_match) { par_res.push_back(par_mat); par_metrics.push_back(ss_metric[i].str()); - std::cout << "metric " << par_metrics[i] << std::endl << std::flush; - // rapidjson::Document document; - // ASSERT_FALSE(document.Parse<0>(par_metrics[i].c_str()).HasParseError()); - // EXPECT_EQ(count_matches("stepsize", par_metrics[i]), 1); - // EXPECT_EQ(count_matches("inv_metric", par_metrics[i]), 1); - // EXPECT_EQ(count_matches("[", par_metrics[i]), 3); // list has 2 rows + rapidjson::Document document; + ASSERT_FALSE(document.Parse<0>(par_metrics[i].c_str()).HasParseError()); + EXPECT_EQ(count_matches("stepsize", par_metrics[i]), 1); + EXPECT_EQ(count_matches("inv_metric", par_metrics[i]), 1); + EXPECT_EQ(count_matches("[", par_metrics[i]), 3); // list has 2 rows } std::vector seq_res; diff --git a/src/test/unit/services/sample/hmc_nuts_diag_e_adapt_parallel_match_test.cpp b/src/test/unit/services/sample/hmc_nuts_diag_e_adapt_parallel_match_test.cpp index dfc0659709..ea8728b8fd 100644 --- a/src/test/unit/services/sample/hmc_nuts_diag_e_adapt_parallel_match_test.cpp +++ b/src/test/unit/services/sample/hmc_nuts_diag_e_adapt_parallel_match_test.cpp @@ -1,12 +1,12 @@ #include -#include #include #include #include -#include +#include #include #include #include +#include #include #include #include diff --git a/src/test/unit/services/sample/hmc_nuts_unit_e_adapt_parallel_test.cpp b/src/test/unit/services/sample/hmc_nuts_unit_e_adapt_parallel_test.cpp index cc93d172bc..c2dc9b4d82 100644 --- a/src/test/unit/services/sample/hmc_nuts_unit_e_adapt_parallel_test.cpp +++ b/src/test/unit/services/sample/hmc_nuts_unit_e_adapt_parallel_test.cpp @@ -1,35 +1,58 @@ #include -#include +#include +#include #include +#include #include #include -#include +#include +#include #include +#include auto&& blah = stan::math::init_threadpool_tbb(); static constexpr size_t num_chains = 4; + +struct deleter_noop { + template + constexpr void operator()(T* arg) const {} +}; + class ServicesSampleHmcNutsUnitEAdaptPar : public testing::Test { public: - ServicesSampleHmcNutsUnitEAdaptPar() : model(data_context, 0, &model_log) { + ServicesSampleHmcNutsUnitEAdaptPar() + : ss_metric(num_chains), + model(data_context, 0, &model_log) { for (int i = 0; i < num_chains; ++i) { init.push_back(stan::test::unit::instrumented_writer{}); parameter.push_back(stan::test::unit::instrumented_writer{}); diagnostic.push_back(stan::test::unit::instrumented_writer{}); - metric.push_back(stan::callbacks::structured_writer( - std::unique_ptr(nullptr))); + metric.push_back( + stan::callbacks::json_writer( + std::unique_ptr(&ss_metric[i]))); context.push_back(std::make_shared()); } } + + void SetUp() { + for (int i = 0; i < num_chains; ++i) { + ss_metric[i].str(std::string()); + ss_metric[i].clear(); + } + } + stan::io::empty_var_context data_context; std::stringstream model_log; stan::test::unit::instrumented_logger logger; std::vector init; std::vector parameter; std::vector diagnostic; - std::vector metric; std::vector> context; stan_model model; + std::vector ss_metric; + std::vector> + metric; }; TEST_F(ServicesSampleHmcNutsUnitEAdaptPar, call_count) { @@ -92,7 +115,7 @@ TEST_F(ServicesSampleHmcNutsUnitEAdaptPar, parameter_checks) { model, num_chains, context, random_seed, chain, init_radius, num_warmup, num_samples, num_thin, save_warmup, refresh, stepsize, stepsize_jitter, max_depth, delta, gamma, kappa, t0, interrupt, logger, init, parameter, - diagnostic); + diagnostic, metric); for (size_t i = 0; i < num_chains; ++i) { std::vector> parameter_names; @@ -103,6 +126,14 @@ TEST_F(ServicesSampleHmcNutsUnitEAdaptPar, parameter_checks) { diagnostic_names = diagnostic[i].vector_string_values(); std::vector> diagnostic_values; diagnostic_values = diagnostic[i].vector_double_values(); + std::string metric = ss_metric[i].str(); + // Adapted metric + rapidjson::Document document; + ASSERT_FALSE(document.Parse<0>(metric.c_str()).HasParseError()); + EXPECT_EQ(count_matches("stepsize", metric), 1); + EXPECT_EQ(count_matches("inv_metric", metric), 1); + EXPECT_EQ(count_matches("[", metric), 1); // single list + EXPECT_EQ(count_matches("[ 1, 1 ]", metric), 1); // unit diagonal // Expectations of parameter parameter names. ASSERT_EQ(9, parameter_names[0].size()); diff --git a/src/test/unit/services/sample/hmc_nuts_unit_e_parallel_test.cpp b/src/test/unit/services/sample/hmc_nuts_unit_e_parallel_test.cpp index 23038d304a..2c0fe7d16d 100644 --- a/src/test/unit/services/sample/hmc_nuts_unit_e_parallel_test.cpp +++ b/src/test/unit/services/sample/hmc_nuts_unit_e_parallel_test.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -16,17 +15,16 @@ class ServicesSampleHmcNutsUnitEPar : public testing::Test { init.push_back(stan::test::unit::instrumented_writer{}); parameter.push_back(stan::test::unit::instrumented_writer{}); diagnostic.push_back(stan::test::unit::instrumented_writer{}); - metric.push_back(stan::callbacks::structured_writer()); context.push_back(std::make_shared()); } } + stan::io::empty_var_context data_context; std::stringstream model_log; stan::test::unit::instrumented_logger logger; std::vector init; std::vector parameter; std::vector diagnostic; - std::vector metric; std::vector> context; stan_model model; }; @@ -92,100 +90,84 @@ TEST_F(ServicesSampleHmcNutsUnitEPar, parameter_checks) { stan::test::unit::instrumented_interrupt interrupt; EXPECT_EQ(interrupt.call_count(), 0); - std::vector ss_metric; - std::vector metric; - for (int i = 0; i < num_chains; ++i) { - metric.emplace_back( - stan::callbacks::json_writer( - std::unique_ptr(&ss_metric[i]))); - - int return_code = stan::services::sample::hmc_nuts_unit_e( - model, num_chains, context, random_seed, chain, init_radius, num_warmup, - num_samples, num_thin, save_warmup, refresh, stepsize, stepsize_jitter, - max_depth, interrupt, logger, init, parameter, diagnostic, metric); - - for (size_t i = 0; i < num_chains; ++i) { - std::vector> parameter_names; - parameter_names = parameter[i].vector_string_values(); - std::vector> parameter_values; - parameter_values = parameter[i].vector_double_values(); - std::vector> diagnostic_names; - diagnostic_names = diagnostic[i].vector_string_values(); - std::vector> diagnostic_values; - diagnostic_values = diagnostic[i].vector_double_values(); - std::vector metrics; - metrics[i] = ss_metric[i].str(); - // Adapted metric - rapidjson::Document document; - ASSERT_FALSE(document.Parse<0>(metrics[i].c_str()).HasParseError()); - EXPECT_EQ(count_matches("stepsize", metrics[i]), 1); - EXPECT_EQ(count_matches("inv_metric", metrics[i]), 1); - EXPECT_EQ(count_matches("[", par_metrics[i]), 1); // single list - EXPECT_EQ(count_matches("[ 0, 0 ]", par_metrics[i]), 1); // unit diagonal - - // Expectations of parameter parameter names. - ASSERT_EQ(9, parameter_names[0].size()); - EXPECT_EQ("lp__", parameter_names[0][0]); - EXPECT_EQ("accept_stat__", parameter_names[0][1]); - EXPECT_EQ("stepsize__", parameter_names[0][2]); - EXPECT_EQ("treedepth__", parameter_names[0][3]); - EXPECT_EQ("n_leapfrog__", parameter_names[0][4]); - EXPECT_EQ("divergent__", parameter_names[0][5]); - EXPECT_EQ("energy__", parameter_names[0][6]); - EXPECT_EQ("x", parameter_names[0][7]); - EXPECT_EQ("y", parameter_names[0][8]); - - // Expect one name per parameter value. - EXPECT_EQ(parameter_names[0].size(), parameter_values[0].size()); - EXPECT_EQ(diagnostic_names[0].size(), diagnostic_values[0].size()); - - EXPECT_EQ((num_warmup + num_samples) / num_thin, parameter_values.size()); - - // Expect one call to set parameter names, and one set of output per - // iteration. - EXPECT_EQ("lp__", diagnostic_names[0][0]); - EXPECT_EQ("accept_stat__", diagnostic_names[0][1]); - } - EXPECT_EQ(return_code, 0); + int return_code = stan::services::sample::hmc_nuts_unit_e( + model, num_chains, context, random_seed, chain, init_radius, num_warmup, + num_samples, num_thin, save_warmup, refresh, stepsize, stepsize_jitter, + max_depth, interrupt, logger, init, parameter, diagnostic); + + for (size_t i = 0; i < num_chains; ++i) { + std::vector> parameter_names; + parameter_names = parameter[i].vector_string_values(); + std::vector> parameter_values; + parameter_values = parameter[i].vector_double_values(); + std::vector> diagnostic_names; + diagnostic_names = diagnostic[i].vector_string_values(); + std::vector> diagnostic_values; + diagnostic_values = diagnostic[i].vector_double_values(); + + // Expectations of parameter parameter names. + ASSERT_EQ(9, parameter_names[0].size()); + EXPECT_EQ("lp__", parameter_names[0][0]); + EXPECT_EQ("accept_stat__", parameter_names[0][1]); + EXPECT_EQ("stepsize__", parameter_names[0][2]); + EXPECT_EQ("treedepth__", parameter_names[0][3]); + EXPECT_EQ("n_leapfrog__", parameter_names[0][4]); + EXPECT_EQ("divergent__", parameter_names[0][5]); + EXPECT_EQ("energy__", parameter_names[0][6]); + EXPECT_EQ("x", parameter_names[0][7]); + EXPECT_EQ("y", parameter_names[0][8]); + + // Expect one name per parameter value. + EXPECT_EQ(parameter_names[0].size(), parameter_values[0].size()); + EXPECT_EQ(diagnostic_names[0].size(), diagnostic_values[0].size()); + + EXPECT_EQ((num_warmup + num_samples) / num_thin, parameter_values.size()); + + // Expect one call to set parameter names, and one set of output per + // iteration. + EXPECT_EQ("lp__", diagnostic_names[0][0]); + EXPECT_EQ("accept_stat__", diagnostic_names[0][1]); } + EXPECT_EQ(return_code, 0); +} - TEST_F(ServicesSampleHmcNutsUnitEPar, output_regression) { - unsigned int random_seed = 0; - unsigned int chain = 1; - double init_radius = 0; - int num_warmup = 200; - int num_samples = 400; - int num_thin = 5; - bool save_warmup = true; - int refresh = 0; - double stepsize = 0.1; - double stepsize_jitter = 0; - int max_depth = 8; - double delta = .1; - double gamma = .1; - double kappa = .1; - double t0 = .1; - unsigned int init_buffer = 50; - unsigned int term_buffer = 50; - unsigned int window = 100; - stan::test::unit::instrumented_interrupt interrupt; - EXPECT_EQ(interrupt.call_count(), 0); - - stan::services::sample::hmc_nuts_unit_e( - model, num_chains, context, random_seed, chain, init_radius, num_warmup, - num_samples, num_thin, save_warmup, refresh, stepsize, stepsize_jitter, - max_depth, interrupt, logger, init, parameter, diagnostic); - - for (auto&& init_it : init) { - std::vector init_values; - init_values = init_it.string_values(); - - EXPECT_EQ(0, init_values.size()); - } +TEST_F(ServicesSampleHmcNutsUnitEPar, output_regression) { + unsigned int random_seed = 0; + unsigned int chain = 1; + double init_radius = 0; + int num_warmup = 200; + int num_samples = 400; + int num_thin = 5; + bool save_warmup = true; + int refresh = 0; + double stepsize = 0.1; + double stepsize_jitter = 0; + int max_depth = 8; + double delta = .1; + double gamma = .1; + double kappa = .1; + double t0 = .1; + unsigned int init_buffer = 50; + unsigned int term_buffer = 50; + unsigned int window = 100; + stan::test::unit::instrumented_interrupt interrupt; + EXPECT_EQ(interrupt.call_count(), 0); - EXPECT_EQ(num_chains, logger.find_info("Elapsed Time:")); - EXPECT_EQ(num_chains, logger.find_info("seconds (Warm-up)")); - EXPECT_EQ(num_chains, logger.find_info("seconds (Sampling)")); - EXPECT_EQ(num_chains, logger.find_info("seconds (Total)")); - EXPECT_EQ(0, logger.call_count_error()); + stan::services::sample::hmc_nuts_unit_e( + model, num_chains, context, random_seed, chain, init_radius, num_warmup, + num_samples, num_thin, save_warmup, refresh, stepsize, stepsize_jitter, + max_depth, interrupt, logger, init, parameter, diagnostic); + + for (auto&& init_it : init) { + std::vector init_values; + init_values = init_it.string_values(); + + EXPECT_EQ(0, init_values.size()); } + + EXPECT_EQ(num_chains, logger.find_info("Elapsed Time:")); + EXPECT_EQ(num_chains, logger.find_info("seconds (Warm-up)")); + EXPECT_EQ(num_chains, logger.find_info("seconds (Sampling)")); + EXPECT_EQ(num_chains, logger.find_info("seconds (Total)")); + EXPECT_EQ(0, logger.call_count_error()); +} diff --git a/src/test/unit/services/util/generate_transitions_test.cpp b/src/test/unit/services/util/generate_transitions_test.cpp index 83ae23b132..ce0499a64c 100644 --- a/src/test/unit/services/util/generate_transitions_test.cpp +++ b/src/test/unit/services/util/generate_transitions_test.cpp @@ -39,7 +39,7 @@ TEST_F(ServicesSamplesGenerateTransitions, call_counting) { model, context, rng, init_radius, false, logger, diagnostic); stan::mcmc::fixed_param_sampler sampler; - stan::services::util::mcmc_writer writer( + stan::services::util::mcmc_writer writer( parameter, diagnostic, dummy_metric_writer, logger); Eigen::VectorXd cont_params(cont_vector.size()); for (size_t i = 0; i < cont_vector.size(); i++) @@ -96,7 +96,7 @@ TEST_F(ServicesSamplesGenerateTransitions, output_sizes) { model, context, rng, init_radius, false, logger, diagnostic); stan::mcmc::fixed_param_sampler sampler; - stan::services::util::mcmc_writer writer( + stan::services::util::mcmc_writer writer( parameter, diagnostic, dummy_metric_writer, logger); Eigen::VectorXd cont_params(cont_vector.size()); for (size_t i = 0; i < cont_vector.size(); i++) diff --git a/src/test/unit/services/util/mcmc_writer_test.cpp b/src/test/unit/services/util/mcmc_writer_test.cpp index 599f6c127a..af6406607d 100644 --- a/src/test/unit/services/util/mcmc_writer_test.cpp +++ b/src/test/unit/services/util/mcmc_writer_test.cpp @@ -171,7 +171,7 @@ class ServicesUtil : public ::testing::Test { stan::test::unit::instrumented_writer sample_writer, diagnostic_writer; stan::callbacks::structured_writer dummy_metric_writer; stan::test::unit::instrumented_logger logger; - stan::services::util::mcmc_writer mcmc_writer; + stan::services::util::mcmc_writer mcmc_writer; std::stringstream model_log; stan::io::empty_var_context context; stan_model model;