Running 'rstan.R' [10s]
Running the tests in 'tests/rstan.R' failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(rstan)
  Loading required package: StanHeaders
  Loading required package: ggplot2
  rstan (Version 2.19.2, GitRev: 2e1f913d3ca3)
  For execution on a local, multicore CPU with excess RAM we recommend calling
  options(mc.cores = parallel::detectCores()).
  To avoid recompilation of unchanged Stan programs, we recommend calling
  rstan_options(auto_write = TRUE)
  For improved execution time, we recommend calling
  Sys.setenv(LOCAL_CPPFLAGS = '-march=native')
  although this causes Stan to throw an error on a few processors.
  > stancode <- 'data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}'
  > mod <- stan_model(model_code = stancode, verbose = TRUE)
  
  TRANSLATING MODEL '73fc79f8b1915e8208c736914c86d1a1' FROM Stan CODE TO C++ CODE NOW.
  successful in parsing the Stan model '73fc79f8b1915e8208c736914c86d1a1'.
  OS: i386, mingw32; rstan: 2.19.2; Rcpp: 1.0.3; inline: 0.3.15 
   >> setting environment variables: 
  PKG_LIBS =  -L"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/libs/i386" -lStanHeaders
  PKG_CPPFLAGS =   -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/Rcpp/include/"  -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/RcppEigen/include/"  -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/RcppEigen/include/unsupported"  -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/BH/include" -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/src/"  -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/"  -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS -std=c++1y
   >> Program source :
  
     1 : 
     2 : // includes from the plugin
     3 : // [[Rcpp::plugins(cpp14)]]
     4 : 
     5 : // user includes
     6 : #define STAN__SERVICES__COMMAND_HPP// Code generated by Stan version 2.19.1
     7 : 
     8 : #include <stan/model/model_header.hpp>
     9 : 
    10 : namespace model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace {
    11 : 
    12 : using std::istream;
    13 : using std::string;
    14 : using std::stringstream;
    15 : using std::vector;
    16 : using stan::io::dump;
    17 : using stan::math::lgamma;
    18 : using stan::model::prob_grad;
    19 : using namespace stan::math;
    20 : 
    21 : static int current_statement_begin__;
    22 : 
    23 : stan::io::program_reader prog_reader__() {
    24 :     stan::io::program_reader reader;
    25 :     reader.add_event(0, 0, "start", "model31888268b5997_73fc79f8b1915e8208c736914c86d1a1");
    26 :     reader.add_event(3, 1, "end", "model31888268b5997_73fc79f8b1915e8208c736914c86d1a1");
    27 :     return reader;
    28 : }
    29 : 
    30 : class model31888268b5997_73fc79f8b1915e8208c736914c86d1a1 : public prob_grad {
    31 : private:
    32 :         double y_mean;
    33 : public:
    34 :     model31888268b5997_73fc79f8b1915e8208c736914c86d1a1(stan::io::var_context& context__,
    35 :         std::ostream* pstream__ = 0)
    36 :         : prob_grad(0) {
    37 :         ctor_body(context__, 0, pstream__);
    38 :     }
    39 : 
    40 :     model31888268b5997_73fc79f8b1915e8208c736914c86d1a1(stan::io::var_context& context__,
    41 :         unsigned int random_seed__,
    42 :         std::ostream* pstream__ = 0)
    43 :         : prob_grad(0) {
    44 :         ctor_body(context__, random_seed__, pstream__);
    45 :     }
    46 : 
    47 :     void ctor_body(stan::io::var_context& context__,
    48 :                    unsigned int random_seed__,
    49 :                    std::ostream* pstream__) {
    50 :         typedef double local_scalar_t__;
    51 : 
    52 :         boost::ecuyer1988 base_rng__ =
    53 :           stan::services::util::create_rng(random_seed__, 0);
    54 :         (void) base_rng__;  // suppress unused var warning
    55 : 
    56 :         current_statement_begin__ = -1;
    57 : 
    58 :         static const char* function__ = "model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1";
    59 :         (void) function__;  // dummy to suppress unused var warning
    60 :         size_t pos__;
    61 :         (void) pos__;  // dummy to suppress unused var warning
    62 :         std::vector<int> vals_i__;
    63 :         std::vector<double> vals_r__;
    64 :         local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN());
    65 :         (void) DUMMY_VAR__;  // suppress unused var warning
    66 : 
    67 :         try {
    68 :             // initialize data block variables from context__
    69 :             current_statement_begin__ = 1;
    70 :             context__.validate_dims("data initialization", "y_mean", "double", context__.to_vec());
    71 :             y_mean = double(0);
    72 :             vals_r__ = context__.vals_r("y_mean");
    73 :             pos__ = 0;
    74 :             y_mean = vals_r__[pos__++];
    75 : 
    76 : 
    77 :             // initialize transformed data variables
    78 :             // execute transformed data statements
    79 : 
    80 :             // validate transformed data
    81 : 
    82 :             // validate, set parameter ranges
    83 :             num_params_r__ = 0U;
    84 :             param_ranges_i__.clear();
    85 :             current_statement_begin__ = 1;
    86 :             num_params_r__ += 1;
    87 :         } catch (const std::exception& e) {
    88 :             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
    89 :             // Next line prevents compiler griping about no return
    90 :             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
    91 :         }
    92 :     }
    93 : 
    94 :     ~model31888268b5997_73fc79f8b1915e8208c736914c86d1a1() { }
    95 : 
    96 : 
    97 :     void transform_inits(const stan::io::var_context& context__,
    98 :                          std::vector<int>& params_i__,
    99 :                          std::vector<double>& params_r__,
   100 :                          std::ostream* pstream__) const {
   101 :         typedef double local_scalar_t__;
   102 :         stan::io::writer<double> writer__(params_r__, params_i__);
   103 :         size_t pos__;
   104 :         (void) pos__; // dummy call to supress warning
   105 :         std::vector<double> vals_r__;
   106 :         std::vector<int> vals_i__;
   107 : 
   108 :         current_statement_begin__ = 1;
   109 :         if (!(context__.contains_r("y")))
   110 :             stan::lang::rethrow_located(std::runtime_error(std::string("Variable y missing")), current_statement_begin__, prog_reader__());
   111 :         vals_r__ = context__.vals_r("y");
   112 :         pos__ = 0U;
   113 :         context__.validate_dims("parameter initialization", "y", "double", context__.to_vec());
   114 :         double y(0);
   115 :         y = vals_r__[pos__++];
   116 :         try {
   117 :             writer__.scalar_unconstrain(y);
   118 :         } catch (const std::exception& e) {
   119 :             stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable y: ") + e.what()), current_statement_begin__, prog_reader__());
   120 :         }
   121 : 
   122 :         params_r__ = writer__.data_r();
   123 :         params_i__ = writer__.data_i();
   124 :     }
   125 : 
   126 :     void transform_inits(const stan::io::var_context& context,
   127 :                          Eigen::Matrix<double, Eigen::Dynamic, 1>& params_r,
   128 :                          std::ostream* pstream__) const {
   129 :       std::vector<double> params_r_vec;
   130 :       std::vector<int> params_i_vec;
   131 :       transform_inits(context, params_i_vec, params_r_vec, pstream__);
   132 :       params_r.resize(params_r_vec.size());
   133 :       for (int i = 0; i < params_r.size(); ++i)
   134 :         params_r(i) = params_r_vec[i];
   135 :     }
   136 : 
   137 : 
   138 :     template <bool propto__, bool jacobian__, typename T__>
   139 :     T__ log_prob(std::vector<T__>& params_r__,
   140 :                  std::vector<int>& params_i__,
   141 :                  std::ostream* pstream__ = 0) const {
   142 : 
   143 :         typedef T__ local_scalar_t__;
   144 : 
   145 :         local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN());
   146 :         (void) DUMMY_VAR__;  // dummy to suppress unused var warning
   147 : 
   148 :         T__ lp__(0.0);
   149 :         stan::math::accumulator<T__> lp_accum__;
   150 :         try {
   151 :             stan::io::reader<local_scalar_t__> in__(params_r__, params_i__);
   152 : 
   153 :             // model parameters
   154 :             current_statement_begin__ = 1;
   155 :             local_scalar_t__ y;
   156 :             (void) y;  // dummy to suppress unused var warning
   157 :             if (jacobian__)
   158 :                 y = in__.scalar_constrain(lp__);
   159 :             else
   160 :                 y = in__.scalar_constrain();
   161 : 
   162 :             // model body
   163 : 
   164 :             current_statement_begin__ = 1;
   165 :             lp_accum__.add(normal_log<propto__>(y, y_mean, 1));
   166 : 
   167 :         } catch (const std::exception& e) {
   168 :             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
   169 :             // Next line prevents compiler griping about no return
   170 :             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
   171 :         }
   172 : 
   173 :         lp_accum__.add(lp__);
   174 :         return lp_accum__.sum();
   175 : 
   176 :     } // log_prob()
   177 : 
   178 :     template <bool propto, bool jacobian, typename T_>
   179 :     T_ log_prob(Eigen::Matrix<T_,Eigen::Dynamic,1>& params_r,
   180 :                std::ostream* pstream = 0) const {
   181 :       std::vector<T_> vec_params_r;
   182 :       vec_params_r.reserve(params_r.size());
   183 :       for (int i = 0; i < params_r.size(); ++i)
   184 :         vec_params_r.push_back(params_r(i));
   185 :       std::vector<int> vec_params_i;
   186 :       return log_prob<propto,jacobian,T_>(vec_params_r, vec_params_i, pstream);
   187 :     }
   188 : 
   189 : 
   190 :     void get_param_names(std::vector<std::string>& names__) const {
   191 :         names__.resize(0);
   192 :         names__.push_back("y");
   193 :     }
   194 : 
   195 : 
   196 :     void get_dims(std::vector<std::vector<size_t> >& dimss__) const {
   197 :         dimss__.resize(0);
   198 :         std::vector<size_t> dims__;
   199 :         dims__.resize(0);
   200 :         dimss__.push_back(dims__);
   201 :     }
   202 : 
   203 :     template <typename RNG>
   204 :     void write_array(RNG& base_rng__,
   205 :                      std::vector<double>& params_r__,
   206 :                      std::vector<int>& params_i__,
   207 :                      std::vector<double>& vars__,
   208 :                      bool include_tparams__ = true,
   209 :                      bool include_gqs__ = true,
   210 :                      std::ostream* pstream__ = 0) const {
   211 :         typedef double local_scalar_t__;
   212 : 
   213 :         vars__.resize(0);
   214 :         stan::io::reader<local_scalar_t__> in__(params_r__, params_i__);
   215 :         static const char* function__ = "model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::write_array";
   216 :         (void) function__;  // dummy to suppress unused var warning
   217 : 
   218 :         // read-transform, write parameters
   219 :         double y = in__.scalar_constrain();
   220 :         vars__.push_back(y);
   221 : 
   222 :         double lp__ = 0.0;
   223 :         (void) lp__;  // dummy to suppress unused var warning
   224 :         stan::math::accumulator<double> lp_accum__;
   225 : 
   226 :         local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN());
   227 :         (void) DUMMY_VAR__;  // suppress unused var warning
   228 : 
   229 :         if (!include_tparams__ && !include_gqs__) return;
   230 : 
   231 :         try {
   232 :             if (!include_gqs__ && !include_tparams__) return;
   233 :             if (!include_gqs__) return;
   234 :         } catch (const std::exception& e) {
   235 :             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
   236 :             // Next line prevents compiler griping about no return
   237 :             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
   238 :         }
   239 :     }
   240 : 
   241 :     template <typename RNG>
   242 :     void write_array(RNG& base_rng,
   243 :                      Eigen::Matrix<double,Eigen::Dynamic,1>& params_r,
   244 :                      Eigen::Matrix<double,Eigen::Dynamic,1>& vars,
   245 :                      bool include_tparams = true,
   246 :                      bool include_gqs = true,
   247 :                      std::ostream* pstream = 0) const {
   248 :       std::vector<double> params_r_vec(params_r.size());
   249 :       for (int i = 0; i < params_r.size(); ++i)
   250 :         params_r_vec[i] = params_r(i);
   251 :       std::vector<double> vars_vec;
   252 :       std::vector<int> params_i_vec;
   253 :       write_array(base_rng, params_r_vec, params_i_vec, vars_vec, include_tparams, include_gqs, pstream);
   254 :       vars.resize(vars_vec.size());
   255 :       for (int i = 0; i < vars.size(); ++i)
   256 :         vars(i) = vars_vec[i];
   257 :     }
   258 : 
   259 :     static std::string model_name() {
   260 :         return "model31888268b5997_73fc79f8b1915e8208c736914c86d1a1";
   261 :     }
   262 : 
   263 : 
   264 :     void constrained_param_names(std::vector<std::string>& param_names__,
   265 :                                  bool include_tparams__ = true,
   266 :                                  bool include_gqs__ = true) const {
   267 :         std::stringstream param_name_stream__;
   268 :         param_name_stream__.str(std::string());
   269 :         param_name_stream__ << "y";
   270 :         param_names__.push_back(param_name_stream__.str());
   271 : 
   272 :         if (!include_gqs__ && !include_tparams__) return;
   273 : 
   274 :         if (include_tparams__) {
   275 :         }
   276 : 
   277 :         if (!include_gqs__) return;
   278 :     }
   279 : 
   280 : 
   281 :     void unconstrained_param_names(std::vector<std::string>& param_names__,
   282 :                                    bool include_tparams__ = true,
   283 :                                    bool include_gqs__ = true) const {
   284 :         std::stringstream param_name_stream__;
   285 :         param_name_stream__.str(std::string());
   286 :         param_name_stream__ << "y";
   287 :         param_names__.push_back(param_name_stream__.str());
   288 : 
   289 :         if (!include_gqs__ && !include_tparams__) return;
   290 : 
   291 :         if (include_tparams__) {
   292 :         }
   293 : 
   294 :         if (!include_gqs__) return;
   295 :     }
   296 : 
   297 : }; // model
   298 : 
   299 : }  // namespace
   300 : 
   301 : typedef model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1 stan_model;
   302 : 
   303 : #include <rstan/rstaninc.hpp>
   304 : /**
   305 :  * Define Rcpp Module to expose stan_fit's functions to R.
   306 :  */
   307 : RCPP_MODULE(stan_fit4model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_mod){
   308 :   Rcpp::class_<rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1,
   309 :                boost::random::ecuyer1988> >("stan_fit4model31888268b5997_73fc79f8b1915e8208c736914c86d1a1")
   310 :     // .constructor<Rcpp::List>()
   311 :     .constructor<SEXP, SEXP, SEXP>()
   312 :     // .constructor<SEXP, SEXP>()
   313 :     .method("call_sampler",
   314 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::call_sampler)
   315 :     .method("param_names",
   316 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_names)
   317 :     .method("param_names_oi",
   318 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_names_oi)
   319 :     .method("param_fnames_oi",
   320 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_fnames_oi)
   321 :     .method("param_dims",
   322 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_dims)
   323 :     .method("param_dims_oi",
   324 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_dims_oi)
   325 :     .method("update_param_oi",
   326 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::update_param_oi)
   327 :     .method("param_oi_tidx",
   328 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_oi_tidx)
   329 :     .method("grad_log_prob",
   330 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::grad_log_prob)
   331 :     .method("log_prob",
   332 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::log_prob)
   333 :     .method("unconstrain_pars",
   334 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::unconstrain_pars)
   335 :     .method("constrain_pars",
   336 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::constrain_pars)
   337 :     .method("num_pars_unconstrained",
   338 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::num_pars_unconstrained)
   339 :     .method("unconstrained_param_names",
   340 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::unconstrained_param_names)
   341 :     .method("constrained_param_names",
   342 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::constrained_param_names)
   343 :     .method("standalone_gqs",
   344 :             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::standalone_gqs)
   345 :   ;
   346 : }
   347 : 
   348 : // declarations
   349 : extern "C" {
   350 : SEXP file318885ba87a60( ) ;
   351 : }
   352 : 
   353 : // definition
   354 : 
   355 : SEXP file318885ba87a60(  ){
   356 :  return Rcpp::wrap("73fc79f8b1915e8208c736914c86d1a1");
   357 : }
   358 : 
   359 : 
  Compilation argument:
   D:/RCompile/recent/R-36~1.1/bin/i386/R CMD SHLIB file318885ba87a60.cpp 2> file318885ba87a60.cpp.err.txt 
  make[1]: Entering directory `/cygdrive/d/temp/Rtmp06C3P4'
  d:/Compiler/gcc-4.9.3/mingw_32/bin/g++  -std=gnu++11 -I"D:/RCompile/recent/R-36~1.1/include" -DNDEBUG   -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/Rcpp/include/"  -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/RcppEigen/include/"  -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/RcppEigen/include/unsupported"  -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/BH/include" -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/src/"  -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/"  -I"D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/rstan/include" -DEIGEN_NO_DEBUG  -DBOOST_DISABLE_ASSERTS -std=c++1y    -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c file318885ba87a60.cpp -o file318885ba87a60.o
  make[1]: Leaving directory `/cygdrive/d/temp/Rtmp06C3P4'
  In file included from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/stan/math/prim/arr/functor/integrate_ode_rk45.hpp:17:0,
                   from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/stan/math/prim/arr.hpp:46,
                   from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/stan/math/prim/mat.hpp:344,
                   from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/stan/math/rev/mat.hpp:12,
                   from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/stan/math.hpp:4,
                   from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file318885ba87a60.cpp:8:
  D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/BH/include/boost/numeric/odeint.hpp:31:76: fatal error: boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp: No such file or directory
   #include <boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp>
                                                                              ^
  compilation terminated.
  make[1]: *** [file318885ba87a60.o] Error 1
  
  ERROR(s) during compilation: source code errors or compiler configuration errors!
  
  Program source:
    1: 
    2: // includes from the plugin
    3: // [[Rcpp::plugins(cpp14)]]
    4: 
    5: // user includes
    6: #define STAN__SERVICES__COMMAND_HPP// Code generated by Stan version 2.19.1
    7: 
    8: #include <stan/model/model_header.hpp>
    9: 
   10: namespace model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace {
   11: 
   12: using std::istream;
   13: using std::string;
   14: using std::stringstream;
   15: using std::vector;
   16: using stan::io::dump;
   17: using stan::math::lgamma;
   18: using stan::model::prob_grad;
   19: using namespace stan::math;
   20: 
   21: static int current_statement_begin__;
   22: 
   23: stan::io::program_reader prog_reader__() {
   24:     stan::io::program_reader reader;
   25:     reader.add_event(0, 0, "start", "model31888268b5997_73fc79f8b1915e8208c736914c86d1a1");
   26:     reader.add_event(3, 1, "end", "model31888268b5997_73fc79f8b1915e8208c736914c86d1a1");
   27:     return reader;
   28: }
   29: 
   30: class model31888268b5997_73fc79f8b1915e8208c736914c86d1a1 : public prob_grad {
   31: private:
   32:         double y_mean;
   33: public:
   34:     model31888268b5997_73fc79f8b1915e8208c736914c86d1a1(stan::io::var_context& context__,
   35:         std::ostream* pstream__ = 0)
   36:         : prob_grad(0) {
   37:         ctor_body(context__, 0, pstream__);
   38:     }
   39: 
   40:     model31888268b5997_73fc79f8b1915e8208c736914c86d1a1(stan::io::var_context& context__,
   41:         unsigned int random_seed__,
   42:         std::ostream* pstream__ = 0)
   43:         : prob_grad(0) {
   44:         ctor_body(context__, random_seed__, pstream__);
   45:     }
   46: 
   47:     void ctor_body(stan::io::var_context& context__,
   48:                    unsigned int random_seed__,
   49:                    std::ostream* pstream__) {
   50:         typedef double local_scalar_t__;
   51: 
   52:         boost::ecuyer1988 base_rng__ =
   53:           stan::services::util::create_rng(random_seed__, 0);
   54:         (void) base_rng__;  // suppress unused var warning
   55: 
   56:         current_statement_begin__ = -1;
   57: 
   58:         static const char* function__ = "model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1";
   59:         (void) function__;  // dummy to suppress unused var warning
   60:         size_t pos__;
   61:         (void) pos__;  // dummy to suppress unused var warning
   62:         std::vector<int> vals_i__;
   63:         std::vector<double> vals_r__;
   64:         local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN());
   65:         (void) DUMMY_VAR__;  // suppress unused var warning
   66: 
   67:         try {
   68:             // initialize data block variables from context__
   69:             current_statement_begin__ = 1;
   70:             context__.validate_dims("data initialization", "y_mean", "double", context__.to_vec());
   71:             y_mean = double(0);
   72:             vals_r__ = context__.vals_r("y_mean");
   73:             pos__ = 0;
   74:             y_mean = vals_r__[pos__++];
   75: 
   76: 
   77:             // initialize transformed data variables
   78:             // execute transformed data statements
   79: 
   80:             // validate transformed data
   81: 
   82:             // validate, set parameter ranges
   83:             num_params_r__ = 0U;
   84:             param_ranges_i__.clear();
   85:             current_statement_begin__ = 1;
   86:             num_params_r__ += 1;
   87:         } catch (const std::exception& e) {
   88:             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
   89:             // Next line prevents compiler griping about no return
   90:             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
   91:         }
   92:     }
   93: 
   94:     ~model31888268b5997_73fc79f8b1915e8208c736914c86d1a1() { }
   95: 
   96: 
   97:     void transform_inits(const stan::io::var_context& context__,
   98:                          std::vector<int>& params_i__,
   99:                          std::vector<double>& params_r__,
  100:                          std::ostream* pstream__) const {
  101:         typedef double local_scalar_t__;
  102:         stan::io::writer<double> writer__(params_r__, params_i__);
  103:         size_t pos__;
  104:         (void) pos__; // dummy call to supress warning
  105:         std::vector<double> vals_r__;
  106:         std::vector<int> vals_i__;
  107: 
  108:         current_statement_begin__ = 1;
  109:         if (!(context__.contains_r("y")))
  110:             stan::lang::rethrow_located(std::runtime_error(std::string("Variable y missing")), current_statement_begin__, prog_reader__());
  111:         vals_r__ = context__.vals_r("y");
  112:         pos__ = 0U;
  113:         context__.validate_dims("parameter initialization", "y", "double", context__.to_vec());
  114:         double y(0);
  115:         y = vals_r__[pos__++];
  116:         try {
  117:             writer__.scalar_unconstrain(y);
  118:         } catch (const std::exception& e) {
  119:             stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable y: ") + e.what()), current_statement_begin__, prog_reader__());
  120:         }
  121: 
  122:         params_r__ = writer__.data_r();
  123:         params_i__ = writer__.data_i();
  124:     }
  125: 
  126:     void transform_inits(const stan::io::var_context& context,
  127:                          Eigen::Matrix<double, Eigen::Dynamic, 1>& params_r,
  128:                          std::ostream* pstream__) const {
  129:       std::vector<double> params_r_vec;
  130:       std::vector<int> params_i_vec;
  131:       transform_inits(context, params_i_vec, params_r_vec, pstream__);
  132:       params_r.resize(params_r_vec.size());
  133:       for (int i = 0; i < params_r.size(); ++i)
  134:         params_r(i) = params_r_vec[i];
  135:     }
  136: 
  137: 
  138:     template <bool propto__, bool jacobian__, typename T__>
  139:     T__ log_prob(std::vector<T__>& params_r__,
  140:                  std::vector<int>& params_i__,
  141:                  std::ostream* pstream__ = 0) const {
  142: 
  143:         typedef T__ local_scalar_t__;
  144: 
  145:         local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN());
  146:         (void) DUMMY_VAR__;  // dummy to suppress unused var warning
  147: 
  148:         T__ lp__(0.0);
  149:         stan::math::accumulator<T__> lp_accum__;
  150:         try {
  151:             stan::io::reader<local_scalar_t__> in__(params_r__, params_i__);
  152: 
  153:             // model parameters
  154:             current_statement_begin__ = 1;
  155:             local_scalar_t__ y;
  156:             (void) y;  // dummy to suppress unused var warning
  157:             if (jacobian__)
  158:                 y = in__.scalar_constrain(lp__);
  159:             else
  160:                 y = in__.scalar_constrain();
  161: 
  162:             // model body
  163: 
  164:             current_statement_begin__ = 1;
  165:             lp_accum__.add(normal_log<propto__>(y, y_mean, 1));
  166: 
  167:         } catch (const std::exception& e) {
  168:             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
  169:             // Next line prevents compiler griping about no return
  170:             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
  171:         }
  172: 
  173:         lp_accum__.add(lp__);
  174:         return lp_accum__.sum();
  175: 
  176:     } // log_prob()
  177: 
  178:     template <bool propto, bool jacobian, typename T_>
  179:     T_ log_prob(Eigen::Matrix<T_,Eigen::Dynamic,1>& params_r,
  180:                std::ostream* pstream = 0) const {
  181:       std::vector<T_> vec_params_r;
  182:       vec_params_r.reserve(params_r.size());
  183:       for (int i = 0; i < params_r.size(); ++i)
  184:         vec_params_r.push_back(params_r(i));
  185:       std::vector<int> vec_params_i;
  186:       return log_prob<propto,jacobian,T_>(vec_params_r, vec_params_i, pstream);
  187:     }
  188: 
  189: 
  190:     void get_param_names(std::vector<std::string>& names__) const {
  191:         names__.resize(0);
  192:         names__.push_back("y");
  193:     }
  194: 
  195: 
  196:     void get_dims(std::vector<std::vector<size_t> >& dimss__) const {
  197:         dimss__.resize(0);
  198:         std::vector<size_t> dims__;
  199:         dims__.resize(0);
  200:         dimss__.push_back(dims__);
  201:     }
  202: 
  203:     template <typename RNG>
  204:     void write_array(RNG& base_rng__,
  205:                      std::vector<double>& params_r__,
  206:                      std::vector<int>& params_i__,
  207:                      std::vector<double>& vars__,
  208:                      bool include_tparams__ = true,
  209:                      bool include_gqs__ = true,
  210:                      std::ostream* pstream__ = 0) const {
  211:         typedef double local_scalar_t__;
  212: 
  213:         vars__.resize(0);
  214:         stan::io::reader<local_scalar_t__> in__(params_r__, params_i__);
  215:         static const char* function__ = "model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::write_array";
  216:         (void) function__;  // dummy to suppress unused var warning
  217: 
  218:         // read-transform, write parameters
  219:         double y = in__.scalar_constrain();
  220:         vars__.push_back(y);
  221: 
  222:         double lp__ = 0.0;
  223:         (void) lp__;  // dummy to suppress unused var warning
  224:         stan::math::accumulator<double> lp_accum__;
  225: 
  226:         local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN());
  227:         (void) DUMMY_VAR__;  // suppress unused var warning
  228: 
  229:         if (!include_tparams__ && !include_gqs__) return;
  230: 
  231:         try {
  232:             if (!include_gqs__ && !include_tparams__) return;
  233:             if (!include_gqs__) return;
  234:         } catch (const std::exception& e) {
  235:             stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__());
  236:             // Next line prevents compiler griping about no return
  237:             throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***");
  238:         }
  239:     }
  240: 
  241:     template <typename RNG>
  242:     void write_array(RNG& base_rng,
  243:                      Eigen::Matrix<double,Eigen::Dynamic,1>& params_r,
  244:                      Eigen::Matrix<double,Eigen::Dynamic,1>& vars,
  245:                      bool include_tparams = true,
  246:                      bool include_gqs = true,
  247:                      std::ostream* pstream = 0) const {
  248:       std::vector<double> params_r_vec(params_r.size());
  249:       for (int i = 0; i < params_r.size(); ++i)
  250:         params_r_vec[i] = params_r(i);
  251:       std::vector<double> vars_vec;
  252:       std::vector<int> params_i_vec;
  253:       write_array(base_rng, params_r_vec, params_i_vec, vars_vec, include_tparams, include_gqs, pstream);
  254:       vars.resize(vars_vec.size());
  255:       for (int i = 0; i < vars.size(); ++i)
  256:         vars(i) = vars_vec[i];
  257:     }
  258: 
  259:     static std::string model_name() {
  260:         return "model31888268b5997_73fc79f8b1915e8208c736914c86d1a1";
  261:     }
  262: 
  263: 
  264:     void constrained_param_names(std::vector<std::string>& param_names__,
  265:                                  bool include_tparams__ = true,
  266:                                  bool include_gqs__ = true) const {
  267:         std::stringstream param_name_stream__;
  268:         param_name_stream__.str(std::string());
  269:         param_name_stream__ << "y";
  270:         param_names__.push_back(param_name_stream__.str());
  271: 
  272:         if (!include_gqs__ && !include_tparams__) return;
  273: 
  274:         if (include_tparams__) {
  275:         }
  276: 
  277:         if (!include_gqs__) return;
  278:     }
  279: 
  280: 
  281:     void unconstrained_param_names(std::vector<std::string>& param_names__,
  282:                                    bool include_tparams__ = true,
  283:                                    bool include_gqs__ = true) const {
  284:         std::stringstream param_name_stream__;
  285:         param_name_stream__.str(std::string());
  286:         param_name_stream__ << "y";
  287:         param_names__.push_back(param_name_stream__.str());
  288: 
  289:         if (!include_gqs__ && !include_tparams__) return;
  290: 
  291:         if (include_tparams__) {
  292:         }
  293: 
  294:         if (!include_gqs__) return;
  295:     }
  296: 
  297: }; // model
  298: 
  299: }  // namespace
  300: 
  301: typedef model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1 stan_model;
  302: 
  303: #include <rstan/rstaninc.hpp>
  304: /**
  305:  * Define Rcpp Module to expose stan_fit's functions to R.
  306:  */
  307: RCPP_MODULE(stan_fit4model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_mod){
  308:   Rcpp::class_<rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1,
  309:                boost::random::ecuyer1988> >("stan_fit4model31888268b5997_73fc79f8b1915e8208c736914c86d1a1")
  310:     // .constructor<Rcpp::List>()
  311:     .constructor<SEXP, SEXP, SEXP>()
  312:     // .constructor<SEXP, SEXP>()
  313:     .method("call_sampler",
  314:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::call_sampler)
  315:     .method("param_names",
  316:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_names)
  317:     .method("param_names_oi",
  318:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_names_oi)
  319:     .method("param_fnames_oi",
  320:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_fnames_oi)
  321:     .method("param_dims",
  322:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_dims)
  323:     .method("param_dims_oi",
  324:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_dims_oi)
  325:     .method("update_param_oi",
  326:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::update_param_oi)
  327:     .method("param_oi_tidx",
  328:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::param_oi_tidx)
  329:     .method("grad_log_prob",
  330:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::grad_log_prob)
  331:     .method("log_prob",
  332:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::log_prob)
  333:     .method("unconstrain_pars",
  334:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::unconstrain_pars)
  335:     .method("constrain_pars",
  336:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::constrain_pars)
  337:     .method("num_pars_unconstrained",
  338:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::num_pars_unconstrained)
  339:     .method("unconstrained_param_names",
  340:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::unconstrained_param_names)
  341:     .method("constrained_param_names",
  342:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::constrained_param_names)
  343:     .method("standalone_gqs",
  344:             &rstan::stan_fit<model31888268b5997_73fc79f8b1915e8208c736914c86d1a1_namespace::model31888268b5997_73fc79f8b1915e8208c736914c86d1a1, boost::random::ecuyer1988>::standalone_gqs)
  345:   ;
  346: }
  347: 
  348: // declarations
  349: extern "C" {
  350: SEXP file318885ba87a60( ) ;
  351: }
  352: 
  353: // definition
  354: 
  355: SEXP file318885ba87a60(  ){
  356:  return Rcpp::wrap("73fc79f8b1915e8208c736914c86d1a1");
  357: }
  358: 
  359: 
  Error in compileCode(f, code, language = language, verbose = verbose) : 
    Compilation ERROR, function(s)/method(s) not created! In file included from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/stan/math/prim/arr/functor/integrate_ode_rk45.hpp:17:0,
                   from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/stan/math/prim/arr.hpp:46,
                   from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/stan/math/prim/mat.hpp:344,
                   from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/stan/math/rev/mat.hpp:12,
                   from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/stan/math.hpp:4,
                   from D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/StanHeaders/include/src/stan/model/model_header.hpp:4,
                   from file318885ba87a60.cpp:8:
  D:/temp/Rtmpyylymj/RLIBS_1fcf45b5c6da9/BH/include/boost/numeric/odeint.hpp:31:76: fatal error: boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp: No such file or directory
   #include <boost/numeric/od
  Calls: stan_model ... <Anonymous> -> <Anonymous> -> force -> cxxfunction -> compileCode
  Execution halted