paul-buerkner / brms

brms R package for Bayesian generalized multivariate non-linear multilevel models using Stan
https://paul-buerkner.github.io/brms/
GNU General Public License v2.0
1.27k stars 183 forks source link

Error in brm compileCode involving RcppEigen? #1266

Closed ardollam closed 2 years ago

ardollam commented 2 years ago

Dear Paul:

I can usually get to the bottom of problems with R packages but this one has me stumped. brm loads okay and accepts commands but quits when it is trying to compile. Below I'm attaching the error messages plus information about my R installation and packages. The problem does not seem to be related to rstan specifically, because I can get rstanarm to run fine.

Sincerely,

Niall Bolger Columbia U.

#####################################################

brm(conformity~fscore, data=Moore) Compiling Stan program... make cmd is make -f "C:/PROGRA~1/R/R-41~1.2/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-41~1.2/share/make/winshlib.mk" CXX='$(CXX14) $(CXX14STD)' CXXFLAGS='$(CXX14FLAGS)' CXXPICFLAGS='$(CXX14PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX14LDFLAGS)' SHLIB_LD='$(SHLIB_CXX14LD)' SHLIB="file138442045337.dll" WIN=64 TCLBIN=64 OBJECTS="file138442045337.o"

make would use if test "zfile138442045337.o" != "z"; then \ if test -e "file138442045337-win.def"; then \ echo "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file138442045337.dll file138442045337-win.def file138442045337.o "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/lib/x64/libStanServices.a" -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/lib/x64" -ltbb -LC:\Users\NIALLB~1\Dropbox\MYPC(L~1\DOCUME~1\R\WIN-LI~1\4.1\RCPPPA~1\lib\x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-41~1.2/bin/x64" -lR ; \ "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file138442045337.dll file138442045337-win.def file138442045337.o "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/lib/x64/libStanServices.a" -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/lib/x64" -ltbb -LC:\Users\NIALLB~1\Dropbox\MYPC(L~1\DOCUME~1\R\WIN-LI~1\4.1\RCPPPA~1\lib\x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-41~1.2/bin/x64" -lR ; \ else \ echo EXPORTS > tmp.def; \ "C:/rtools40/mingw64/bin/"nm file138442045337.o | sed -n 's/^. [BCDRT] / /p' | sed -e '/[.]refptr[.]/d' -e '/[.]weak[.]/d' | sed 's/[^ ][^ ]/"&"/g' >> tmp.def; \ echo "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file138442045337.dll tmp.def file138442045337.o "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/lib/x64/libStanServices.a" -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/lib/x64" -ltbb -LC:\Users\NIALLB~1\Dropbox\MYPC(L~1\DOCUME~1\R\WIN-LI~1\4.1\RCPPPA~1\lib\x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-41~1.2/bin/x64" -lR ; \ "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file138442045337.dll tmp.def file138442045337.o "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/lib/x64/libStanServices.a" -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/lib/x64" -ltbb -LC:\Users\NIALLB~1\Dropbox\MYPC(L~1\DOCUME~1\R\WIN-LI~1\4.1\RCPPPA~1\lib\x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-41~1.2/bin/x64" -lR ; \ rm -f tmp.def; \ fi \ fi Error in compileCode(f, code, language = language, verbose = verbose) : C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument 'Eigen::internal::packet_traits::type' {aka '__vector(2) double'} [-Wignored-attributes] >::type PacketReturnType; ^~~~sh: -c: line 3: syntax error near unexpected token ('sh: -c: line 3: echo "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file138442045337.dll file138442045337-win.def file138442045337.o "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/lib/x64/libStanServices.a" -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/lib/x64" -ltbb -LC:\Users\NIALLB~1\Dropbox\MYPC(L~1\DOCUME~1\R\WIN-LI~ Error in sink(type = "output") : invalid connection

######################################### My R installation and packages:

print(.libPaths()) [1] "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1" [2] "C:/Program Files/R/R-4.1.2/library"

print(sessionInfo()) R version 4.1.2 (2021-11-01) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] car_3.0-12 carData_3.0-4 brms_2.16.1 Rcpp_1.0.7

loaded via a namespace (and not attached): [1] minqa_1.2.4 colorspace_2.0-2 ellipsis_0.3.2
[4] ggridges_0.5.3 rsconnect_0.8.24 markdown_1.1
[7] base64enc_0.1-3 farver_2.1.0 rstan_2.26.4
[10] DT_0.20 fansi_0.5.0 mvtnorm_1.1-3
[13] bridgesampling_1.1-2 codetools_0.2-18 splines_4.1.2
[16] knitr_1.36 shinythemes_1.2.0 bayesplot_1.8.1
[19] projpred_2.0.2 jsonlite_1.7.2 nloptr_1.2.2.2
[22] shiny_1.7.1 compiler_4.1.2 backports_1.3.0
[25] assertthat_0.2.1 Matrix_1.3-4 fastmap_1.1.0
[28] cli_3.1.0 later_1.3.0 htmltools_0.5.2
[31] prettyunits_1.1.1 tools_4.1.2 igraph_1.2.7
[34] coda_0.19-4 gtable_0.3.0 glue_1.5.0
[37] reshape2_1.4.4 dplyr_1.0.7 posterior_1.1.0
[40] V8_3.4.2 vctrs_0.3.8 nlme_3.1-153
[43] crosstalk_1.2.0 tensorA_0.36.2 xfun_0.28
[46] stringr_1.4.0 ps_1.6.0 lme4_1.1-27.1
[49] mime_0.12 miniUI_0.1.1.1 lifecycle_1.0.1
[52] gtools_3.9.2 MASS_7.3-54 zoo_1.8-9
[55] scales_1.1.1 colourpicker_1.1.1 promises_1.2.0.1
[58] Brobdingnag_1.2-6 parallel_4.1.2 inline_0.3.19
[61] shinystan_2.5.0 gamm4_0.2-6 yaml_2.2.1
[64] curl_4.3.2 gridExtra_2.3 ggplot2_3.3.5
[67] loo_2.4.1 StanHeaders_2.26.4 stringi_1.7.5
[70] dygraphs_1.1.1.6 checkmate_2.0.0 boot_1.3-28
[73] pkgbuild_1.2.0 rlang_0.4.12 pkgconfig_2.0.3
[76] matrixStats_0.61.0 distributional_0.2.2 evaluate_0.14
[79] lattice_0.20-45 purrr_0.3.4 rstantools_2.1.1
[82] htmlwidgets_1.5.4 tidyselect_1.1.1 processx_3.5.2
[85] plyr_1.8.6 magrittr_2.0.1 R6_2.5.1
[88] generics_0.1.1 DBI_1.1.1 pillar_1.6.4
[91] withr_2.4.2 mgcv_1.8-38 xts_0.12.1
[94] abind_1.4-5 tibble_3.1.6 crayon_1.4.2
[97] utf8_1.2.2 rmarkdown_2.11 grid_4.1.2
[100] callr_3.7.0 threejs_0.3.3 digest_0.6.28
[103] xtable_1.8-4 httpuv_1.6.3 RcppParallel_5.1.4
[106] stats4_4.1.2 munsell_0.5.0 shinyjs_2.0.0

print(version) _
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 4
minor 1.2
year 2021
month 11
day 01
svn rev 81115
language R
version.string R version 4.1.2 (2021-11-01) nickname Bird Hippie

andrjohns commented 2 years ago

Hi Niall,

Is the behaviour different if you pause the dropbox sync before compiling?

Are you able to run the rstan example model?

example(stan_model, package="rstan", run.dontrun=T)
ardollam commented 2 years ago

Dear Andrew:

Thanks so much for the help. I paused Dropbox and tried to run the example model. It generated a lot of text but ultimately did not run. I'm pasting the complete output below, but am putting the error message at the top of it.

Niall

############################################################ Final Error Message ############################################################

Compilation ERROR, function(s)/method(s) not created! Error in compileCode(f, code, language = language, verbose = verbose) : C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/include/src/stan/mcmc/hmc/hamiltonians/dense_e_metric.hpp:22:56: required from 'double stan::mcmc::dense_e_metric<Model, BaseRNG>::T(stan::mcmc::dense_e_point&) [with Model = model1384485bbe2namespace::model1384485bbe2_; BaseRNG = boost::random::additive_combine_engine<boost::random::linear_congruential_engine<unsigned int, 40014, 0, 2147483563>, boost::random::linear_congruential_engine<unsigned int, 40692, 0, 2147483399> >]'C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/include/src/stan/mcmc/hmc/hamiltonians/dense_e_metric.hpp:21:10: required from hereC:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument 'Eigen::internal::packet_traits::type' {aka 'vector(2) double'} [-Wignored-attribute

############################################################ Complete Output ############################################################

example(stan_model, package="rstan", run.dontrun=T) Loading required package: StanHeaders

rstan version 2.26.4 (Stan version 2.26.1)

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 within-chain threading using reduce_sum() or map_rect() Stan functions, change threads_per_chain option: rstan_options(threads_per_chain = 1)

Do not specify '-march=native' in 'LOCAL_CPPFLAGS' or a Makevars file

Attaching package: ‘rstan’

The following object is masked from ‘package:tidyr’:

extract

The following object is masked from ‘package:psych’:

lookup

stn_md> stancode <- 'data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}'

stn_md> mod <- stan_model(model_code = stancode, verbose = TRUE)

TRANSLATING MODEL '' FROM Stan CODE TO C++ CODE NOW. COMPILING THE C++ CODE FOR MODEL 'anon_model' NOW. OS: x86_64, mingw32; rstan: 2.26.4; Rcpp: 1.0.7; inline: 0.3.19

setting environment variables: LOCAL_LIBS = "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/lib/x64/libStanServices.a" -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/lib/x64" -ltbb -LC:\Users\NIALLB~1\Dropbox\MYPC(L~1\DOCUME~1\R\WIN-LI~1\4.1\RCPPPA~1\lib\x64 -ltbb -ltbbmalloc PKG_CPPFLAGS = -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/Rcpp/include/" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppEigen/include/" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppEigen/include/unsupported" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/BH/include" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/include/src/" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/include/" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/include/" -DRCPP_PARALLEL_USE_TBB=1 -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DUSE_STANC3 -DSTRICT_R_HEADERS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -DBOOST_NO_AUTO_PTR -include "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/include/stan/math/prim/fun/Eigen.hpp" -std=c++1y Program source :

1 : 2 : // includes from the plugin 3 : // [[Rcpp::plugins(cpp14)]] 4 : 5 : 6 : // user includes 7 : #include 8 : using namespace Rcpp; 9 : #ifndef MODELS_HPP 10 : #define MODELS_HPP 11 : #define STANSERVICESCOMMAND_HPP 12 : #include <rstan/rstaninc.hpp> 13 : #ifndef USE_STANC3 14 : #define USE_STANC3 15 : #endif 16 : 17 : // Code generated by stanc v2.26.1 18 : #include <stan/model/model_header.hpp> 19 : namespace model1384485bbe2namespace { 20 : 21 : 22 : inline void validate_positive_index(const char var_name, const char expr, 23 : int val) { 24 : if (val < 1) { 25 : std::stringstream msg; 26 : msg << "Found dimension size less than one in simplex declaration" 27 : << "; variable=" << var_name << "; dimension size expression=" << expr 28 : << "; expression value=" << val; 29 : std::string msg_str(msg.str()); 30 : throw std::invalid_argument(msg_str.c_str()); 31 : } 32 : } 33 : 34 : inline void validate_unit_vector_index(const char var_name, const char expr, 35 : int val) { 36 : if (val <= 1) { 37 : std::stringstream msg; 38 : if (val == 1) { 39 : msg << "Found dimension size one in unit vector declaration." 40 : << " One-dimensional unit vector is discrete" 41 : << " but the target distribution must be continuous." 42 : << " variable=" << var_name << "; dimension size expression=" << expr; 43 : } else { 44 : msg << "Found dimension size less than one in unit vector declaration" 45 : << "; variable=" << var_name << "; dimension size expression=" << expr 46 : << "; expression value=" << val; 47 : } 48 : std::string msg_str(msg.str()); 49 : throw std::invalid_argument(msg_str.c_str()); 50 : } 51 : } 52 : 53 : 54 : using std::istream; 55 : using std::string; 56 : using std::stringstream; 57 : using std::vector; 58 : using std::pow; 59 : using stan::io::dump; 60 : using stan::math::lgamma; 61 : using stan::model::model_base_crtp; 62 : using stan::model::rvalue; 63 : using stan::model::cons_list; 64 : using stan::model::index_uni; 65 : using stan::model::index_max; 66 : using stan::model::index_min; 67 : using stan::model::index_min_max; 68 : using stan::model::index_multi; 69 : using stan::model::index_omni; 70 : using stan::model::nil_index_list; 71 : using namespace stan::math; 72 : using stan::math::pow; 73 : 74 : stan::math::profile_map profiles__; 75 : static int current_statement= 0; 76 : static const std::vector locations_array = {" (found before start of program)", 77 : " (in 'string', line 1, column 32 to column 39)", 78 : " (in 'string', line 1, column 48 to column 69)", 79 : " (in 'string', line 1, column 6 to column 18)"}; 80 : 81 : 82 : 83 : class model1384485bbe2_ final : public model_basecrtp<model1384485bbe2> { 84 : 85 : private: 86 : double ymean; 87 : 88 : public: 89 : ~model1384485bbe2() { } 90 : 91 : inline std::string modelname() const final { return "model1384485bbe2"; } 92 : 93 : inline std::vector model_compile_info() const noexcept { 94 : return std::vector{"stancversion = stanc3 v2.26.1", "stancflags = "}; 95 : } 96 : 97 : 98 : model1384485bbe2(stan::io::var_context& context__, 99 : unsigned int random_seed = 0, 100 : std::ostream pstream = nullptr) : model_base_crtp(0) { 101 : using local_scalar_t = double ; 102 : boost::ecuyer1988 base_rng = 103 : stan::services::util::create_rng(random_seed, 0); 104 : (void) base_rng__; // suppress unused var warning 105 : static const char function = "model1384485bbe2namespace::model1384485bbe2_"; 106 : (void) function; // suppress unused var warning 107 : local_scalar_t DUMMY_VAR(std::numeric_limits::quiet_NaN()); 108 : (void) DUMMY_VAR; // suppress unused var warning 109 : 110 : try { 111 : int pos; 112 : pos__ = std::numeric_limits::min(); 113 : 114 : pos = 1; 115 : current_statement = 3; 116 : context.validate_dims("data initialization","y_mean","double", 117 : context.to_vec()); 118 : y_mean = std::numeric_limits::quiet_NaN(); 119 : 120 : current_statement__ = 3; 121 : y_mean = context.vals_r("y_mean")[(1 - 1)]; 122 : } catch (const std::exception& e) { 123 : stan::lang::rethrow_located(e, locations_array[current_statement__]); 124 : // Next line prevents compiler griping about no return 125 : throw std::runtime_error(" IF YOU SEE THIS, PLEASE REPORT A BUG "); 126 : } 127 : num_params_r = 0U; 128 : 129 : try { 130 : num_params_r += 1; 131 : } catch (const std::exception& e) { 132 : stan::lang::rethrow_located(e, locations_array[current_statement]); 133 : // Next line prevents compiler griping about no return 134 : throw std::runtime_error(" IF YOU SEE THIS, PLEASE REPORT A BUG "); 135 : } 136 : } 137 : template <bool propto, bool jacobian, typename VecR, typename VecI, stan::require_vector_like_t = nullptr, stan::require_vector_like_vt<std::is_integral, VecI> = nullptr> 138 : inline stan::scalar_type_t log_prob_impl(VecR& params_r__, 139 : VecI& params_i, 140 : std::ostream pstream = nullptr) const { 141 : using T = stan::scalar_type_t; 142 : using local_scalar_t = T; 143 : T lp(0.0); 144 : stan::math::accumulator lp_accum__; 145 : static const char function = "model1384485bbe2namespace::log_prob"; 146 : (void) function; // suppress unused var warning 147 : 148 : stan::io::reader<local_scalar_t> in(params_r__, params_i); 149 : local_scalar_t DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 150 : (void) DUMMY_VAR; // suppress unused var warning 151 : 152 : 153 : try { 154 : local_scalar_t y; 155 : y = DUMMY_VAR__; 156 : 157 : current_statement = 1; 158 : y = in.scalar(); 159 : { 160 : current_statement__ = 2; 161 : lp_accum.add(normal_lpdf(y, y_mean, 1)); 162 : } 163 : } catch (const std::exception& e) { 164 : stan::lang::rethrow_located(e, locations_array[current_statement]); 165 : // Next line prevents compiler griping about no return 166 : throw std::runtime_error(" IF YOU SEE THIS, PLEASE REPORT A BUG "); 167 : } 168 : lp_accum.add(lp__); 169 : return lp_accum.sum(); 170 : } // log_prob_impl() 171 : 172 : template <typename RNG, typename VecR, typename VecI, typename VecVar, stan::require_vector_like_vt<std::is_floating_point, VecR> = nullptr, stan::require_vector_like_vt<std::is_integral, VecI> = nullptr, stan::require_std_vector_vt<std::is_floating_point, VecVar> = nullptr> 173 : inline void write_array_impl(RNG& base_rng, VecR& params_r__, 174 : VecI& params_i, VecVar& vars, 175 : const bool emit_transformed_parameters = true, 176 : const bool emit_generated_quantities__ = true, 177 : std::ostream pstream = nullptr) const { 178 : using local_scalar_t = double; 179 : vars.resize(0); 180 : stan::io::reader<local_scalar_t> in(params_r__, params_i); 181 : static const char* function = "model1384485bbe2namespace::write_array"; 182 : (void) function; // suppress unused var warning 183 : 184 : (void) function; // suppress unused var warning 185 : 186 : double lp = 0.0; 187 : (void) lp; // dummy to suppress unused var warning 188 : stan::math::accumulator lp_accum; 189 : local_scalar_t DUMMY_VAR(std::numeric_limits::quiet_NaN()); 190 : (void) DUMMY_VAR__; // suppress unused var warning 191 : 192 : 193 : try { 194 : double y; 195 : y = std::numeric_limits::quiet_NaN(); 196 : 197 : current_statement = 1; 198 : y = in.scalar(); 199 : vars.emplace_back(y); 200 : if (logical_negation((primitive_value(emit_transformed_parameters) || 201 : primitive_value(emit_generated_quantities__)))) { 202 : return ; 203 : } 204 : if (logical_negation(emit_generated_quantities)) { 205 : return ; 206 : } 207 : } catch (const std::exception& e) { 208 : stan::lang::rethrow_located(e, locations_array[current_statement__]); 209 : // Next line prevents compiler griping about no return 210 : throw std::runtime_error(" IF YOU SEE THIS, PLEASE REPORT A BUG "); 211 : } 212 : } // write_array_impl() 213 : 214 : template <typename VecVar, typename VecI, stan::require_std_vector_t = nullptr, stan::require_vector_like_vt<std::is_integral, VecI> = nullptr> 215 : inline void transform_inits_impl(const stan::io::var_context& context, 216 : VecI& params_i, VecVar& vars, 217 : std::ostream* pstream = nullptr) const { 218 : using local_scalar_t = double; 219 : vars.clear(); 220 : vars.reserve(num_params_r); 221 : 222 : try { 223 : int pos; 224 : pos = std::numeric_limits::min(); 225 : 226 : pos__ = 1; 227 : double y; 228 : y = std::numeric_limits::quiet_NaN(); 229 : 230 : current_statement = 1; 231 : y = context.vals_r("y")[(1 - 1)]; 232 : vars__.emplace_back(y); 233 : } catch (const std::exception& e) { 234 : stan::lang::rethrow_located(e, locations_array[current_statement]); 235 : // Next line prevents compiler griping about no return 236 : throw std::runtime_error(" IF YOU SEE THIS, PLEASE REPORT A BUG "); 237 : } 238 : } // transform_inits_impl() 239 : 240 : inline void get_param_names(std::vector& names) const { 241 : 242 : names.clear(); 243 : names__.emplace_back("y"); 244 : } // get_param_names() 245 : 246 : inline void get_dims(std::vector<std::vector>& dimss) const { 247 : dimss.clear(); 248 : dimss.emplace_back(std::vector{}); 249 : 250 : } // get_dims() 251 : 252 : inline void constrained_param_names( 253 : std::vector& param_names, 254 : bool emit_transformed_parameters = true, 255 : bool emit_generated_quantities = true) const 256 : final { 257 : 258 : param_names__.emplace_back(std::string() + "y"); 259 : if (emit_transformed_parameters) { 260 : 261 : } 262 : 263 : if (emit_generated_quantities) { 264 : 265 : } 266 : 267 : } // constrained_param_names() 268 : 269 : inline void unconstrained_param_names( 270 : std::vector& param_names, 271 : bool emit_transformed_parameters = true, 272 : bool emit_generated_quantities__ = true) const 273 : final { 274 : 275 : param_names.emplace_back(std::string() + "y"); 276 : if (emit_transformed_parameters) { 277 : 278 : } 279 : 280 : if (emit_generated_quantities) { 281 : 282 : } 283 : 284 : } // unconstrained_param_names() 285 : 286 : inline std::string get_constrained_sizedtypes() const { 287 : stringstream s; 288 : s << "[{\"name\":\"y\",\"type\":{\"name\":\"real\"},\"block\":\"parameters\"}]"; 289 : return s.str(); 290 : } // get_constrained_sizedtypes() 291 : 292 : inline std::string get_unconstrained_sizedtypes() const { 293 : stringstream s; 294 : s << "[{\"name\":\"y\",\"type\":{\"name\":\"real\"},\"block\":\"parameters\"}]"; 295 : return s.str(); 296 : } // get_unconstrained_sizedtypes() 297 : 298 : 299 : // Begin method overload boilerplate 300 : template 301 : inline void write_array(RNG& base_rng, 302 : Eigen::Matrix<double,Eigen::Dynamic,1>& params_r, 303 : Eigen::Matrix<double,Eigen::Dynamic,1>& vars, 304 : const bool emit_transformed_parameters = true, 305 : const bool emit_generated_quantities = true, 306 : std::ostream pstream = nullptr) const { 307 : std::vector vars_vec(vars.size()); 308 : std::vector params_i; 309 : write_array_impl(base_rng, params_r, params_i, vars_vec, 310 : emit_transformed_parameters, emit_generated_quantities, pstream); 311 : vars.resize(vars_vec.size()); 312 : for (int i = 0; i < vars.size(); ++i) { 313 : vars.coeffRef(i) = vars_vec[i]; 314 : } 315 : } 316 : 317 : template 318 : inline void write_array(RNG& base_rng, std::vector& params_r, 319 : std::vector& params_i, 320 : std::vector& vars, 321 : bool emit_transformed_parameters = true, 322 : bool emit_generated_quantities = true, 323 : std::ostream pstream = nullptr) const { 324 : write_array_impl(base_rng, params_r, params_i, vars, emit_transformed_parameters, emit_generatedquantities, pstream); 325 : } 326 : 327 : template <bool propto, bool jacobian, typename T> 328 : inline T_ logprob(Eigen::Matrix<T,Eigen::Dynamic,1>& params_r, 329 : std::ostream pstream = nullptr) const { 330 : Eigen::Matrix<int, -1, 1> params_i; 331 : return log_prob_impl<propto, jacobian>(params_r, params_i, pstream); 332 : } 333 : 334 : template <bool propto, bool jacobian, typename T> 335 : inline T log_prob(std::vector& params_r, 336 : std::vector& params_i, 337 : std::ostream pstream = nullptr) const { 338 : return log_prob_impl<propto, jacobian>(params_r, params_i, pstream); 339 : } 340 : 341 : 342 : inline void transform_inits(const stan::io::var_context& context, 343 : Eigen::Matrix<double, Eigen::Dynamic, 1>& params_r, 344 : std::ostream pstream = nullptr) const final { 345 : std::vector params_r_vec(params_r.size()); 346 : std::vector params_i; 347 : transform_inits_impl(context, params_i, params_r_vec, pstream); 348 : params_r.resize(params_r_vec.size()); 349 : for (int i = 0; i < params_r.size(); ++i) { 350 : params_r.coeffRef(i) = params_r_vec[i]; 351 : } 352 : } 353 : inline void transform_inits(const stan::io::var_context& context, 354 : std::vector& params_i, 355 : std::vector& vars, 356 : std::ostream pstream = nullptr) const final { 357 : transform_inits_impl(context, params_i, vars, pstream); 358 : } 359 : 360 : }; 361 : } 362 : using stan_model = model1384485bbe2_namespace::model1384485bbe2; 363 : 364 : #ifndef USING_R 365 : 366 : // Boilerplate 367 : stan::model::model_base& new_model( 368 : stan::io::var_context& data_context, 369 : unsigned int seed, 370 : std::ostream msg_stream) { 371 : stan_model m = new stan_model(data_context, seed, msg_stream); 372 : return *m; 373 : } 374 : 375 : stan::math::profile_map& get_stan_profile_data() { 376 : return model1384485bbe2namespace::profiles; 377 : } 378 : 379 : #endif 380 : 381 : 382 : 383 : #endif 384 : 385 : RCPP_MODULE(stan_fit4model1384485bbe2_mod) { 386 : class<rstan::stan_fit<stan_model, boost::random::ecuyer1988> >( 387 : "stanfit4model1384485bbe2") 388 : 389 : .constructor<SEXP, SEXP, SEXP>() 390 : 391 : .method( 392 : "call_sampler", 393 : &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::call_sampler) 394 : .method( 395 : "param_names", 396 : &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::param_names) 397 : .method("param_names_oi", 398 : &rstan::stan_fit<stan_model, 399 : boost::random::ecuyer1988>::param_names_oi) 400 : .method("param_fnames_oi", 401 : &rstan::stan_fit<stan_model, 402 : boost::random::ecuyer1988>::param_fnames_oi) 403 : .method( 404 : "param_dims", 405 : &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::param_dims) 406 : .method("param_dims_oi", 407 : &rstan::stan_fit<stan_model, 408 : boost::random::ecuyer1988>::param_dims_oi) 409 : .method("update_param_oi", 410 : &rstan::stan_fit<stan_model, 411 : boost::random::ecuyer1988>::update_param_oi) 412 : .method("param_oi_tidx", 413 : &rstan::stan_fit<stan_model, 414 : boost::random::ecuyer1988>::param_oi_tidx) 415 : .method("grad_log_prob", 416 : &rstan::stan_fit<stan_model, 417 : boost::random::ecuyer1988>::grad_log_prob) 418 : .method("log_prob", 419 : &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::log_prob) 420 : .method("unconstrain_pars", 421 : &rstan::stan_fit<stan_model, 422 : boost::random::ecuyer1988>::unconstrain_pars) 423 : .method("constrain_pars", 424 : &rstan::stan_fit<stan_model, 425 : boost::random::ecuyer1988>::constrain_pars) 426 : .method( 427 : "num_pars_unconstrained", 428 : &rstan::stan_fit<stan_model, 429 : boost::random::ecuyer1988>::num_pars_unconstrained) 430 : .method( 431 : "unconstrained_param_names", 432 : &rstan::stan_fit< 433 : stan_model, boost::random::ecuyer1988>::unconstrained_param_names) 434 : .method( 435 : "constrained_param_names", 436 : &rstan::stan_fit<stan_model, 437 : boost::random::ecuyer1988>::constrained_param_names) 438 : .method("standalone_gqs", 439 : &rstan::stan_fit<stan_model, 440 : boost::random::ecuyer1988>::standalone_gqs); 441 : } 442 : 443 : 444 : // declarations 445 : extern "C" { 446 : SEXP file138436fe3336( ) ; 447 : } 448 : 449 : // definition 450 : SEXP file138436fe3336() { 451 : return Rcpp::wrap("anon_model"); 452 : } make cmd is make -f "C:/PROGRA~1/R/R-41~1.2/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-41~1.2/share/make/winshlib.mk" CXX='$(CXX14) $(CXX14STD)' CXXFLAGS='$(CXX14FLAGS)' CXXPICFLAGS='$(CXX14PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX14LDFLAGS)' SHLIB_LD='$(SHLIB_CXX14LD)' SHLIB="file138436fe3336.dll" WIN=64 TCLBIN=64 OBJECTS="file138436fe3336.o"

make would use "C:/rtools40/mingw64/bin/"g++ -std=gnu++14 -I"C:/PROGRA~1/R/R-41~1.2/include" -DNDEBUG -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/Rcpp/include/" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppEigen/include/" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppEigen/include/unsupported" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/BH/include" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/include/src/" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/include/" -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/include/" -DRCPP_PARALLEL_USE_TBB=1 -I"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DUSE_STANC3 -DSTRICT_R_HEADERS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -DBOOST_NO_AUTO_PTR -include "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/include/stan/math/prim/fun/Eigen.hpp" -std=c++1y -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c file138436fe3336.cpp -o file138436fe3336.o if test "zfile138436fe3336.o" != "z"; then \ if test -e "file138436fe3336-win.def"; then \ echo "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file138436fe3336.dll file138436fe3336-win.def file138436fe3336.o "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/lib/x64/libStanServices.a" -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/lib/x64" -ltbb -LC:\Users\NIALLB~1\Dropbox\MYPC(L~1\DOCUME~1\R\WIN-LI~1\4.1\RCPPPA~1\lib\x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-41~1.2/bin/x64" -lR ; \ "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file138436fe3336.dll file138436fe3336-win.def file138436fe3336.o "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/lib/x64/libStanServices.a" -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/lib/x64" -ltbb -LC:\Users\NIALLB~1\Dropbox\MYPC(L~1\DOCUME~1\R\WIN-LI~1\4.1\RCPPPA~1\lib\x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-41~1.2/bin/x64" -lR ; \ else \ echo EXPORTS > tmp.def; \ "C:/rtools40/mingw64/bin/"nm file138436fe3336.o | sed -n 's/^. [BCDRT] / /p' | sed -e '/[.]refptr[.]/d' -e '/[.]weak[.]/d' | sed 's/[^ ][^ ]/"&"/g' >> tmp.def; \ echo "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file138436fe3336.dll tmp.def file138436fe3336.o "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/lib/x64/libStanServices.a" -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/lib/x64" -ltbb -LC:\Users\NIALLB~1\Dropbox\MYPC(L~1\DOCUME~1\R\WIN-LI~1\4.1\RCPPPA~1\lib\x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-41~1.2/bin/x64" -lR ; \ "C:/rtools40/mingw64/bin/"g++ -shared -s -static-libgcc -o file138436fe3336.dll tmp.def file138436fe3336.o "C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/rstan/lib/x64/libStanServices.a" -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppParallel/lib/x64" -ltbb -LC:\Users\NIALLB~1\Dropbox\MYPC(L~1\DOCUME~1\R\WIN-LI~1\4.1\RCPPPA~1\lib\x64 -ltbb -ltbbmalloc -L"C:/PROGRA~1/R/R-41~1.2/bin/x64" -lR ; \ rm -f tmp.def; \ fi \ fi

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: 6: // user includes 7: #include 8: using namespace Rcpp; 9: #ifndef MODELS_HPP 10: #define MODELS_HPP 11: #define STANSERVICESCOMMAND_HPP 12: #include <rstan/rstaninc.hpp> 13: #ifndef USE_STANC3 14: #define USE_STANC3 15: #endif 16: 17: // Code generated by stanc v2.26.1 18: #include <stan/model/model_header.hpp> 19: namespace model1384485bbe2namespace { 20: 21: 22: inline void validate_positive_index(const char var_name, const char expr, 23: int val) { 24: if (val < 1) { 25: std::stringstream msg; 26: msg << "Found dimension size less than one in simplex declaration" 27: << "; variable=" << var_name << "; dimension size expression=" << expr 28: << "; expression value=" << val; 29: std::string msg_str(msg.str()); 30: throw std::invalid_argument(msg_str.c_str()); 31: } 32: } 33: 34: inline void validate_unit_vector_index(const char var_name, const char expr, 35: int val) { 36: if (val <= 1) { 37: std::stringstream msg; 38: if (val == 1) { 39: msg << "Found dimension size one in unit vector declaration." 40: << " One-dimensional unit vector is discrete" 41: << " but the target distribution must be continuous." 42: << " variable=" << var_name << "; dimension size expression=" << expr; 43: } else { 44: msg << "Found dimension size less than one in unit vector declaration" 45: << "; variable=" << var_name << "; dimension size expression=" << expr 46: << "; expression value=" << val; 47: } 48: std::string msg_str(msg.str()); 49: throw std::invalid_argument(msg_str.c_str()); 50: } 51: } 52: 53: 54: using std::istream; 55: using std::string; 56: using std::stringstream; 57: using std::vector; 58: using std::pow; 59: using stan::io::dump; 60: using stan::math::lgamma; 61: using stan::model::model_base_crtp; 62: using stan::model::rvalue; 63: using stan::model::cons_list; 64: using stan::model::index_uni; 65: using stan::model::index_max; 66: using stan::model::index_min; 67: using stan::model::index_min_max; 68: using stan::model::index_multi; 69: using stan::model::index_omni; 70: using stan::model::nil_index_list; 71: using namespace stan::math; 72: using stan::math::pow; 73: 74: stan::math::profile_map profiles__; 75: static int current_statement= 0; 76: static const std::vector locations_array = {" (found before start of program)", 77: " (in 'string', line 1, column 32 to column 39)", 78: " (in 'string', line 1, column 48 to column 69)", 79: " (in 'string', line 1, column 6 to column 18)"}; 80: 81: 82: 83: class model1384485bbe2_ final : public model_basecrtp<model1384485bbe2> { 84: 85: private: 86: double ymean; 87: 88: public: 89: ~model1384485bbe2() { } 90: 91: inline std::string modelname() const final { return "model1384485bbe2"; } 92: 93: inline std::vector model_compile_info() const noexcept { 94: return std::vector{"stancversion = stanc3 v2.26.1", "stancflags = "}; 95: } 96: 97: 98: model1384485bbe2(stan::io::var_context& context__, 99: unsigned int random_seed = 0, 100: std::ostream pstream = nullptr) : model_base_crtp(0) { 101: using local_scalar_t = double ; 102: boost::ecuyer1988 base_rng = 103: stan::services::util::create_rng(random_seed, 0); 104: (void) base_rng__; // suppress unused var warning 105: static const char function = "model1384485bbe2namespace::model1384485bbe2_"; 106: (void) function; // suppress unused var warning 107: local_scalar_t DUMMY_VAR(std::numeric_limits::quiet_NaN()); 108: (void) DUMMY_VAR; // suppress unused var warning 109: 110: try { 111: int pos; 112: pos__ = std::numeric_limits::min(); 113: 114: pos = 1; 115: current_statement = 3; 116: context.validate_dims("data initialization","y_mean","double", 117: context.to_vec()); 118: y_mean = std::numeric_limits::quiet_NaN(); 119: 120: current_statement__ = 3; 121: y_mean = context.vals_r("y_mean")[(1 - 1)]; 122: } catch (const std::exception& e) { 123: stan::lang::rethrow_located(e, locations_array[current_statement__]); 124: // Next line prevents compiler griping about no return 125: throw std::runtime_error(" IF YOU SEE THIS, PLEASE REPORT A BUG "); 126: } 127: num_params_r = 0U; 128: 129: try { 130: num_params_r += 1; 131: } catch (const std::exception& e) { 132: stan::lang::rethrow_located(e, locations_array[current_statement]); 133: // Next line prevents compiler griping about no return 134: throw std::runtime_error(" IF YOU SEE THIS, PLEASE REPORT A BUG "); 135: } 136: } 137: template <bool propto, bool jacobian, typename VecR, typename VecI, stan::require_vector_like_t = nullptr, stan::require_vector_like_vt<std::is_integral, VecI> = nullptr> 138: inline stan::scalar_type_t log_prob_impl(VecR& params_r__, 139: VecI& params_i, 140: std::ostream pstream = nullptr) const { 141: using T = stan::scalar_type_t; 142: using local_scalar_t = T; 143: T lp(0.0); 144: stan::math::accumulator lp_accum__; 145: static const char function = "model1384485bbe2namespace::log_prob"; 146: (void) function; // suppress unused var warning 147: 148: stan::io::reader<local_scalar_t> in(params_r__, params_i); 149: local_scalar_t DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 150: (void) DUMMY_VAR; // suppress unused var warning 151: 152: 153: try { 154: local_scalar_t y; 155: y = DUMMY_VAR__; 156: 157: current_statement = 1; 158: y = in.scalar(); 159: { 160: current_statement__ = 2; 161: lp_accum.add(normal_lpdf(y, y_mean, 1)); 162: } 163: } catch (const std::exception& e) { 164: stan::lang::rethrow_located(e, locations_array[current_statement]); 165: // Next line prevents compiler griping about no return 166: throw std::runtime_error(" IF YOU SEE THIS, PLEASE REPORT A BUG "); 167: } 168: lp_accum.add(lp__); 169: return lp_accum.sum(); 170: } // log_prob_impl() 171: 172: template <typename RNG, typename VecR, typename VecI, typename VecVar, stan::require_vector_like_vt<std::is_floating_point, VecR> = nullptr, stan::require_vector_like_vt<std::is_integral, VecI> = nullptr, stan::require_std_vector_vt<std::is_floating_point, VecVar> = nullptr> 173: inline void write_array_impl(RNG& base_rng, VecR& params_r__, 174: VecI& params_i, VecVar& vars, 175: const bool emit_transformed_parameters = true, 176: const bool emit_generated_quantities__ = true, 177: std::ostream pstream = nullptr) const { 178: using local_scalar_t = double; 179: vars.resize(0); 180: stan::io::reader<local_scalar_t> in(params_r__, params_i); 181: static const char* function = "model1384485bbe2namespace::write_array"; 182: (void) function; // suppress unused var warning 183: 184: (void) function; // suppress unused var warning 185: 186: double lp = 0.0; 187: (void) lp; // dummy to suppress unused var warning 188: stan::math::accumulator lp_accum; 189: local_scalar_t DUMMY_VAR(std::numeric_limits::quiet_NaN()); 190: (void) DUMMY_VAR__; // suppress unused var warning 191: 192: 193: try { 194: double y; 195: y = std::numeric_limits::quiet_NaN(); 196: 197: current_statement = 1; 198: y = in.scalar(); 199: vars.emplace_back(y); 200: if (logical_negation((primitive_value(emit_transformed_parameters) || 201: primitive_value(emit_generated_quantities__)))) { 202: return ; 203: } 204: if (logical_negation(emit_generated_quantities)) { 205: return ; 206: } 207: } catch (const std::exception& e) { 208: stan::lang::rethrow_located(e, locations_array[current_statement__]); 209: // Next line prevents compiler griping about no return 210: throw std::runtime_error(" IF YOU SEE THIS, PLEASE REPORT A BUG "); 211: } 212: } // write_array_impl() 213: 214: template <typename VecVar, typename VecI, stan::require_std_vector_t = nullptr, stan::require_vector_like_vt<std::is_integral, VecI> = nullptr> 215: inline void transform_inits_impl(const stan::io::var_context& context, 216: VecI& params_i, VecVar& vars, 217: std::ostream* pstream = nullptr) const { 218: using local_scalar_t = double; 219: vars.clear(); 220: vars.reserve(num_params_r); 221: 222: try { 223: int pos; 224: pos = std::numeric_limits::min(); 225: 226: pos__ = 1; 227: double y; 228: y = std::numeric_limits::quiet_NaN(); 229: 230: current_statement = 1; 231: y = context.vals_r("y")[(1 - 1)]; 232: vars__.emplace_back(y); 233: } catch (const std::exception& e) { 234: stan::lang::rethrow_located(e, locations_array[current_statement]); 235: // Next line prevents compiler griping about no return 236: throw std::runtime_error(" IF YOU SEE THIS, PLEASE REPORT A BUG "); 237: } 238: } // transform_inits_impl() 239: 240: inline void get_param_names(std::vector& names) const { 241: 242: names.clear(); 243: names__.emplace_back("y"); 244: } // get_param_names() 245: 246: inline void get_dims(std::vector<std::vector>& dimss) const { 247: dimss.clear(); 248: dimss.emplace_back(std::vector{}); 249: 250: } // get_dims() 251: 252: inline void constrained_param_names( 253: std::vector& param_names, 254: bool emit_transformed_parameters = true, 255: bool emit_generated_quantities = true) const 256: final { 257: 258: param_names__.emplace_back(std::string() + "y"); 259: if (emit_transformed_parameters) { 260: 261: } 262: 263: if (emit_generated_quantities) { 264: 265: } 266: 267: } // constrained_param_names() 268: 269: inline void unconstrained_param_names( 270: std::vector& param_names, 271: bool emit_transformed_parameters = true, 272: bool emit_generated_quantities__ = true) const 273: final { 274: 275: param_names.emplace_back(std::string() + "y"); 276: if (emit_transformed_parameters) { 277: 278: } 279: 280: if (emit_generated_quantities) { 281: 282: } 283: 284: } // unconstrained_param_names() 285: 286: inline std::string get_constrained_sizedtypes() const { 287: stringstream s; 288: s << "[{\"name\":\"y\",\"type\":{\"name\":\"real\"},\"block\":\"parameters\"}]"; 289: return s.str(); 290: } // get_constrained_sizedtypes() 291: 292: inline std::string get_unconstrained_sizedtypes() const { 293: stringstream s; 294: s << "[{\"name\":\"y\",\"type\":{\"name\":\"real\"},\"block\":\"parameters\"}]"; 295: return s.str(); 296: } // get_unconstrained_sizedtypes() 297: 298: 299: // Begin method overload boilerplate 300: template 301: inline void write_array(RNG& base_rng, 302: Eigen::Matrix<double,Eigen::Dynamic,1>& params_r, 303: Eigen::Matrix<double,Eigen::Dynamic,1>& vars, 304: const bool emit_transformed_parameters = true, 305: const bool emit_generated_quantities = true, 306: std::ostream pstream = nullptr) const { 307: std::vector vars_vec(vars.size()); 308: std::vector params_i; 309: write_array_impl(base_rng, params_r, params_i, vars_vec, 310: emit_transformed_parameters, emit_generated_quantities, pstream); 311: vars.resize(vars_vec.size()); 312: for (int i = 0; i < vars.size(); ++i) { 313: vars.coeffRef(i) = vars_vec[i]; 314: } 315: } 316: 317: template 318: inline void write_array(RNG& base_rng, std::vector& params_r, 319: std::vector& params_i, 320: std::vector& vars, 321: bool emit_transformed_parameters = true, 322: bool emit_generated_quantities = true, 323: std::ostream pstream = nullptr) const { 324: write_array_impl(base_rng, params_r, params_i, vars, emit_transformed_parameters, emit_generatedquantities, pstream); 325: } 326: 327: template <bool propto, bool jacobian, typename T> 328: inline T_ logprob(Eigen::Matrix<T,Eigen::Dynamic,1>& params_r, 329: std::ostream pstream = nullptr) const { 330: Eigen::Matrix<int, -1, 1> params_i; 331: return log_prob_impl<propto, jacobian>(params_r, params_i, pstream); 332: } 333: 334: template <bool propto, bool jacobian, typename T> 335: inline T log_prob(std::vector& params_r, 336: std::vector& params_i, 337: std::ostream pstream = nullptr) const { 338: return log_prob_impl<propto, jacobian>(params_r, params_i, pstream); 339: } 340: 341: 342: inline void transform_inits(const stan::io::var_context& context, 343: Eigen::Matrix<double, Eigen::Dynamic, 1>& params_r, 344: std::ostream pstream = nullptr) const final { 345: std::vector params_r_vec(params_r.size()); 346: std::vector params_i; 347: transform_inits_impl(context, params_i, params_r_vec, pstream); 348: params_r.resize(params_r_vec.size()); 349: for (int i = 0; i < params_r.size(); ++i) { 350: params_r.coeffRef(i) = params_r_vec[i]; 351: } 352: } 353: inline void transform_inits(const stan::io::var_context& context, 354: std::vector& params_i, 355: std::vector& vars, 356: std::ostream pstream = nullptr) const final { 357: transform_inits_impl(context, params_i, vars, pstream); 358: } 359: 360: }; 361: } 362: using stan_model = model1384485bbe2_namespace::model1384485bbe2; 363: 364: #ifndef USING_R 365: 366: // Boilerplate 367: stan::model::model_base& new_model( 368: stan::io::var_context& data_context, 369: unsigned int seed, 370: std::ostream msg_stream) { 371: stan_model m = new stan_model(data_context, seed, msg_stream); 372: return *m; 373: } 374: 375: stan::math::profile_map& get_stan_profile_data() { 376: return model1384485bbe2namespace::profiles; 377: } 378: 379: #endif 380: 381: 382: 383: #endif 384: 385: RCPP_MODULE(stan_fit4model1384485bbe2_mod) { 386: class<rstan::stan_fit<stan_model, boost::random::ecuyer1988> >( 387: "stanfit4model1384485bbe2") 388: 389: .constructor<SEXP, SEXP, SEXP>() 390: 391: .method( 392: "call_sampler", 393: &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::call_sampler) 394: .method( 395: "param_names", 396: &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::param_names) 397: .method("param_names_oi", 398: &rstan::stan_fit<stan_model, 399: boost::random::ecuyer1988>::param_names_oi) 400: .method("param_fnames_oi", 401: &rstan::stan_fit<stan_model, 402: boost::random::ecuyer1988>::param_fnames_oi) 403: .method( 404: "param_dims", 405: &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::param_dims) 406: .method("param_dims_oi", 407: &rstan::stan_fit<stan_model, 408: boost::random::ecuyer1988>::param_dims_oi) 409: .method("update_param_oi", 410: &rstan::stan_fit<stan_model, 411: boost::random::ecuyer1988>::update_param_oi) 412: .method("param_oi_tidx", 413: &rstan::stan_fit<stan_model, 414: boost::random::ecuyer1988>::param_oi_tidx) 415: .method("grad_log_prob", 416: &rstan::stan_fit<stan_model, 417: boost::random::ecuyer1988>::grad_log_prob) 418: .method("log_prob", 419: &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::log_prob) 420: .method("unconstrain_pars", 421: &rstan::stan_fit<stan_model, 422: boost::random::ecuyer1988>::unconstrain_pars) 423: .method("constrain_pars", 424: &rstan::stan_fit<stan_model, 425: boost::random::ecuyer1988>::constrain_pars) 426: .method( 427: "num_pars_unconstrained", 428: &rstan::stan_fit<stan_model, 429: boost::random::ecuyer1988>::num_pars_unconstrained) 430: .method( 431: "unconstrained_param_names", 432: &rstan::stan_fit< 433: stan_model, boost::random::ecuyer1988>::unconstrained_param_names) 434: .method( 435: "constrained_param_names", 436: &rstan::stan_fit<stan_model, 437: boost::random::ecuyer1988>::constrained_param_names) 438: .method("standalone_gqs", 439: &rstan::stan_fit<stan_model, 440: boost::random::ecuyer1988>::standalone_gqs); 441: } 442: 443: 444: // declarations 445: extern "C" { 446: SEXP file138436fe3336( ) ; 447: } 448: 449: // definition 450: SEXP file138436fe3336() { 451: return Rcpp::wrap("anon_model"); 452: }

Compilation ERROR, function(s)/method(s) not created! Error in compileCode(f, code, language = language, verbose = verbose) : C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/include/src/stan/mcmc/hmc/hamiltonians/dense_e_metric.hpp:22:56: required from 'double stan::mcmc::dense_e_metric<Model, BaseRNG>::T(stan::mcmc::dense_e_point&) [with Model = model1384485bbe2namespace::model1384485bbe2_; BaseRNG = boost::random::additive_combine_engine<boost::random::linear_congruential_engine<unsigned int, 40014, 0, 2147483563>, boost::random::linear_congruential_engine<unsigned int, 40692, 0, 2147483399> >]'C:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/StanHeaders/include/src/stan/mcmc/hmc/hamiltonians/dense_e_metric.hpp:21:10: required from hereC:/Users/Niall Bolger/Dropbox/My PC (LAPTOP-5APLV4TQ)/Documents/R/win-library/4.1/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument 'Eigen::internal::packet_traits::type' {aka 'vector(2) double'} [-Wignored-attribute

Niall Bolger Professor Department of Psychology Columbia University New York, NY 10027 https://columbiacoupleslab.weebly.com/

Bolger & Laurenceau (2013) Intensive Longitudinal Methods: An Introduction to Diary and Experience Sampling Research http://www.intensivelongitudinal.com/

On Wed, Nov 17, 2021 at 12:29 AM Andrew Johnson @.***> wrote:

Hi Niall,

Is the behaviour different if you pause the dropbox sync before compiling?

Are you able to run the rstan example model?

example(stan_model, package="rstan", run.dontrun=T)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paul-buerkner/brms/issues/1266#issuecomment-971204652, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNRQEDKKI6XCXPE3VFQIGDUMM4THANCNFSM5IFDX2PA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

paul-buerkner commented 2 years ago

I would prefer you ask this question on https://discourse.mc-stan.org/ which is the go to place for brms and Stan related questions.

ardollam commented 2 years ago

I will do that.

Niall Bolger

Niall Bolger Professor Department of Psychology Columbia University New York, NY 10027 https://columbiacoupleslab.weebly.com/

Bolger & Laurenceau (2013) Intensive Longitudinal Methods: An Introduction to Diary and Experience Sampling Research http://www.intensivelongitudinal.com/

On Thu, Nov 18, 2021 at 4:05 AM Paul-Christian Bürkner < @.***> wrote:

I would prefer you ask this question on https://discourse.mc-stan.org/ which is the go to place for brms and Stan related questions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paul-buerkner/brms/issues/1266#issuecomment-972667847, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNRQEDE47QUZMJ7AA3COK3UMS6XFANCNFSM5IFDX2PA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ardollam commented 2 years ago

Dear Paul:

I posted my question on https://discourse.mc-stan.org/ seven days ago and have had no response so far. I was wondering if you had any thoughts on my problem. I am currently teaching a graduate statistics course to psychology students at Columbia, and it is a bit embarrassing not to be able to run brm, which I have found to be a great resource.

Sincerely,

Niall Bolger

P.S. In case you need to find it, here is a snippet of my posting

Error in brm compileCode involving RcppEigen? https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353 Interfaces https://discourse.mc-stan.org/c/interfaces/5brms https://discourse.mc-stan.org/c/interfaces/brms/36 Nov 18 https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353 1 / 1 Nov 18 7d ago https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353 https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353 https://discourse.mc-stan.org/u/ardollam ardollam https://discourse.mc-stan.org/u/ardollam 7d https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353?u=ardollam

Dear discourse.mc-stan:

I can usually get to the bottom of problems with R packages but this one has me stumped. brm loads okay and accepts commands but quits when it is trying to compile. Below I’m attaching the error messages plus information about my R installation and packages. I have checked to see if the problem has anything to do with Dropbox syncing and it does not.

Sincerely,

Niall Bolger Columbia U.

#####################################################

brm(conformityfscore, data=Moore) Compiling Stan program… make cmd is make -f “C:/PROGRA1/R/R-411.2/etc/x64/Makeconf” -f “C:/PROGRA 1/R/R-41~1.2/share/make/winshlib.mk” CXX=’ (CXX14) (CXX14STD)’ CXXFLAGS=’ (C XX14FLAGS)′CXXPICFLAGS=′ (CXX14PICFLAGS)’ SHLIB_LDFLAGS=’ (SHLIBCXX14LDFLAGS )′SHLIBLD=′ (SHLIB_CXX14LD)’ SHLIB=“file138442045337.dll” WIN=64 TCLBIN=64 OBJECTS=“file138442045337.o”

============================================== Niall Bolger Professor Department of Psychology Columbia University New York, NY 10027 https://columbiacoupleslab.weebly.com/

Bolger & Laurenceau (2013) Intensive Longitudinal Methods: An Introduction to Diary and Experience Sampling Research http://www.intensivelongitudinal.com/

On Thu, Nov 18, 2021 at 4:05 AM Paul-Christian Bürkner < @.***> wrote:

I would prefer you ask this question on https://discourse.mc-stan.org/ which is the go to place for brms and Stan related questions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paul-buerkner/brms/issues/1266#issuecomment-972667847, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNRQEDE47QUZMJ7AA3COK3UMS6XFANCNFSM5IFDX2PA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

paul-buerkner commented 2 years ago

I am sorry this error is outside my area of expertise. have you tried using cmdstanr instead of rstan backend?

ardollam @.***> schrieb am Do., 25. Nov. 2021, 13:42:

Dear Paul:

I posted my question on https://discourse.mc-stan.org/ seven days ago and have had no response so far. I was wondering if you had any thoughts on my problem. I am currently teaching a graduate statistics course to psychology students at Columbia, and it is a bit embarrassing not to be able to run brm, which I have found to be a great resource.

Sincerely,

Niall Bolger

P.S. In case you need to find it, here is a snippet of my posting

Error in brm compileCode involving RcppEigen? < https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

Interfaces https://discourse.mc-stan.org/c/interfaces/5brms https://discourse.mc-stan.org/c/interfaces/brms/36 Nov 18 < https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

1 / 1 Nov 18 7d ago < https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

< https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

https://discourse.mc-stan.org/u/ardollam ardollam https://discourse.mc-stan.org/u/ardollam 7d < https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353?u=ardollam

Dear discourse.mc-stan:

I can usually get to the bottom of problems with R packages but this one has me stumped. brm loads okay and accepts commands but quits when it is trying to compile. Below I’m attaching the error messages plus information about my R installation and packages. I have checked to see if the problem has anything to do with Dropbox syncing and it does not.

Sincerely,

Niall Bolger Columbia U.

#####################################################

brm(conformityfscore, data=Moore) Compiling Stan program… make cmd is make -f “C:/PROGRA1/R/R-411.2/etc/x64/Makeconf” -f “C:/PROGRA 1/R/R-41~1.2/share/make/winshlib.mk” CXX=’ (CXX14) (CXX14STD)’ CXXFLAGS=’ (C XX14FLAGS)′CXXPICFLAGS=′ (CXX14PICFLAGS)’ SHLIB_LDFLAGS=’ (SHLIBCXX14LDFLAGS )′SHLIBLD=′ (SHLIB_CXX14LD)’ SHLIB=“file138442045337.dll” WIN=64 TCLBIN=64 OBJECTS=“file138442045337.o”

============================================== Niall Bolger Professor Department of Psychology Columbia University New York, NY 10027 https://columbiacoupleslab.weebly.com/

Bolger & Laurenceau (2013) Intensive Longitudinal Methods: An Introduction to Diary and Experience Sampling Research http://www.intensivelongitudinal.com/

On Thu, Nov 18, 2021 at 4:05 AM Paul-Christian Bürkner < @.***> wrote:

I would prefer you ask this question on https://discourse.mc-stan.org/ which is the go to place for brms and Stan related questions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/paul-buerkner/brms/issues/1266#issuecomment-972667847>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABNRQEDE47QUZMJ7AA3COK3UMS6XFANCNFSM5IFDX2PA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/paul-buerkner/brms/issues/1266#issuecomment-979480212, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCW2AD6WAVT4PZFQYBHSGDUN2UURANCNFSM5IFDX2PA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ardollam commented 2 years ago

Dear Paul:

Thanks for getting back to me. I will try that. Sorry for bothering you. It sounds like I need to talk to someone who is responsible for stan.

Sincerely,

Niall Bolger

Niall Bolger Professor Department of Psychology Columbia University New York, NY 10027 https://columbiacoupleslab.weebly.com/

Bolger & Laurenceau (2013) Intensive Longitudinal Methods: An Introduction to Diary and Experience Sampling Research http://www.intensivelongitudinal.com/

On Thu, Nov 25, 2021 at 5:12 PM Paul-Christian Bürkner < @.***> wrote:

I am sorry this error is outside my area of expertise. have you tried using cmdstanr instead of rstan backend?

ardollam @.***> schrieb am Do., 25. Nov. 2021, 13:42:

Dear Paul:

I posted my question on https://discourse.mc-stan.org/ seven days ago and have had no response so far. I was wondering if you had any thoughts on my problem. I am currently teaching a graduate statistics course to psychology students at Columbia, and it is a bit embarrassing not to be able to run brm, which I have found to be a great resource.

Sincerely,

Niall Bolger

P.S. In case you need to find it, here is a snippet of my posting

Error in brm compileCode involving RcppEigen? <

https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

Interfaces https://discourse.mc-stan.org/c/interfaces/5brms https://discourse.mc-stan.org/c/interfaces/brms/36 Nov 18 <

https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

1 / 1 Nov 18 7d ago <

https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

<

https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

https://discourse.mc-stan.org/u/ardollam ardollam https://discourse.mc-stan.org/u/ardollam 7d <

https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353?u=ardollam

Dear discourse.mc-stan:

I can usually get to the bottom of problems with R packages but this one has me stumped. brm loads okay and accepts commands but quits when it is trying to compile. Below I’m attaching the error messages plus information about my R installation and packages. I have checked to see if the problem has anything to do with Dropbox syncing and it does not.

Sincerely,

Niall Bolger Columbia U.

#####################################################

brm(conformityfscore, data=Moore) Compiling Stan program… make cmd is make -f “C:/PROGRA1/R/R-411.2/etc/x64/Makeconf” -f “C:/PROGRA 1/R/R-41~1.2/share/make/winshlib.mk” CXX=’ (CXX14) (CXX14STD)’ CXXFLAGS=’ (C XX14FLAGS)′CXXPICFLAGS=′ (CXX14PICFLAGS)’ SHLIB_LDFLAGS=’ (SHLIBCXX14LDFLAGS )′SHLIBLD=′ (SHLIB_CXX14LD)’ SHLIB=“file138442045337.dll” WIN=64 TCLBIN=64 OBJECTS=“file138442045337.o”

============================================== Niall Bolger Professor Department of Psychology Columbia University New York, NY 10027 https://columbiacoupleslab.weebly.com/

Bolger & Laurenceau (2013) Intensive Longitudinal Methods: An Introduction to Diary and Experience Sampling Research http://www.intensivelongitudinal.com/

On Thu, Nov 18, 2021 at 4:05 AM Paul-Christian Bürkner < @.***> wrote:

I would prefer you ask this question on https://discourse.mc-stan.org/ which is the go to place for brms and Stan related questions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/paul-buerkner/brms/issues/1266#issuecomment-972667847 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ABNRQEDE47QUZMJ7AA3COK3UMS6XFANCNFSM5IFDX2PA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub < https://github.com/paul-buerkner/brms/issues/1266#issuecomment-979480212>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ADCW2AD6WAVT4PZFQYBHSGDUN2UURANCNFSM5IFDX2PA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paul-buerkner/brms/issues/1266#issuecomment-979489452, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNRQEAYPR4M4SEVGVBN53DUN2YEVANCNFSM5IFDX2PA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ardollam commented 2 years ago

Dear Paul:

Just a quick update. Your suggestion worked. When I used backend="cmdstanr" my problem went away.

Thank you so much!

Niall Bolger

Niall Bolger Professor Department of Psychology Columbia University New York, NY 10027 https://columbiacoupleslab.weebly.com/

Bolger & Laurenceau (2013) Intensive Longitudinal Methods: An Introduction to Diary and Experience Sampling Research http://www.intensivelongitudinal.com/

On Thu, Nov 25, 2021 at 5:12 PM Paul-Christian Bürkner < @.***> wrote:

I am sorry this error is outside my area of expertise. have you tried using cmdstanr instead of rstan backend?

ardollam @.***> schrieb am Do., 25. Nov. 2021, 13:42:

Dear Paul:

I posted my question on https://discourse.mc-stan.org/ seven days ago and have had no response so far. I was wondering if you had any thoughts on my problem. I am currently teaching a graduate statistics course to psychology students at Columbia, and it is a bit embarrassing not to be able to run brm, which I have found to be a great resource.

Sincerely,

Niall Bolger

P.S. In case you need to find it, here is a snippet of my posting

Error in brm compileCode involving RcppEigen? <

https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

Interfaces https://discourse.mc-stan.org/c/interfaces/5brms https://discourse.mc-stan.org/c/interfaces/brms/36 Nov 18 <

https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

1 / 1 Nov 18 7d ago <

https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

<

https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353

https://discourse.mc-stan.org/u/ardollam ardollam https://discourse.mc-stan.org/u/ardollam 7d <

https://discourse.mc-stan.org/t/error-in-brm-compilecode-involving-rcppeigen/25353?u=ardollam

Dear discourse.mc-stan:

I can usually get to the bottom of problems with R packages but this one has me stumped. brm loads okay and accepts commands but quits when it is trying to compile. Below I’m attaching the error messages plus information about my R installation and packages. I have checked to see if the problem has anything to do with Dropbox syncing and it does not.

Sincerely,

Niall Bolger Columbia U.

#####################################################

brm(conformityfscore, data=Moore) Compiling Stan program… make cmd is make -f “C:/PROGRA1/R/R-411.2/etc/x64/Makeconf” -f “C:/PROGRA 1/R/R-41~1.2/share/make/winshlib.mk” CXX=’ (CXX14) (CXX14STD)’ CXXFLAGS=’ (C XX14FLAGS)′CXXPICFLAGS=′ (CXX14PICFLAGS)’ SHLIB_LDFLAGS=’ (SHLIBCXX14LDFLAGS )′SHLIBLD=′ (SHLIB_CXX14LD)’ SHLIB=“file138442045337.dll” WIN=64 TCLBIN=64 OBJECTS=“file138442045337.o”

============================================== Niall Bolger Professor Department of Psychology Columbia University New York, NY 10027 https://columbiacoupleslab.weebly.com/

Bolger & Laurenceau (2013) Intensive Longitudinal Methods: An Introduction to Diary and Experience Sampling Research http://www.intensivelongitudinal.com/

On Thu, Nov 18, 2021 at 4:05 AM Paul-Christian Bürkner < @.***> wrote:

I would prefer you ask this question on https://discourse.mc-stan.org/ which is the go to place for brms and Stan related questions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/paul-buerkner/brms/issues/1266#issuecomment-972667847 , or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ABNRQEDE47QUZMJ7AA3COK3UMS6XFANCNFSM5IFDX2PA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub < https://github.com/paul-buerkner/brms/issues/1266#issuecomment-979480212>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ADCW2AD6WAVT4PZFQYBHSGDUN2UURANCNFSM5IFDX2PA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/paul-buerkner/brms/issues/1266#issuecomment-979489452, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNRQEAYPR4M4SEVGVBN53DUN2YEVANCNFSM5IFDX2PA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.