Closed reubsjw closed 3 years ago
Can you post your sessionInfo()
and try with the new version of rstan and StanHeaders below?
remotes::install_git("https://github.com/stan-dev/rstan", subdir = "StanHeaders", ref = "experimental")
remotes::install_git("https://github.com/stan-dev/rstan", subdir = "rstan/rstan", ref = "experimental")
With the rstan / StanHeaders versions above your program compiles for me. This may have been a bug in a particular version of the stanc compiler that's been fixed now
Hi Steve :)
The versions it's currently using are 2.21.0-7 and 2.21.2 respectively. The programme is running quite happily (aside from constant reminders about integer division), so I think it did compile OK?
The full error message was: When you compile models, you are also contributing to development of the NEXT Stan compiler. In this version of rstan, we compile your model as usual, but also test our new compiler on your syntactically correct model. In this case, the new compiler did not work like we hoped. By filing an issue at https://github.com/stan-dev/stanc3/issues with your model or a minimal example that shows this warning you will be contributing valuable information to Stan and ensuring your models continue working. Thank you! This message can be avoided by wrapping your function call inside suppressMessages() or by first calling rstan_options(javascript = FALSE). Syntax error in 'string', line 819, column 97 to column 106, parsing error: Ill-formed function application. Expect comma-separated list of expressions followed by ")" after "(".
Unless the issue affects reliability I'm a bit reluctant to interrupt it until it's done with these analyses since a previous time I updated rstan and StanHeaders the RStudio Cloud project space in which I did so became unuseable with ctsem and I'm on a ridiculously tight deadline right now. So if you can let me know if there is a reliability issue, otherwise I'll leave it for now and then as soon as it's done I'll grab the sessioninfo and see if I can duplicate the project space and do an experimental update of those packages. Is that OK?
I think this was a previous issue we had with ctsem, yeah no worries at all! The version you are using runs the new stan compiler as a test, but eod it compiles with the old compiler so your model should be fine. if you have time to update it when your project is done that would be awesome but no rush at all
Awesome, thanks so much Steve :)
Thanks @SteveBronder ! Closing as this works on the recent version.
Here's the sessionInfo you asked for @SteveBronder
R version 4.0.3 (2020-10-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.2 LTS
Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3 LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3
locale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 LC_PAPER=C.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] RPushbullet_0.3.4 ctsem_3.5.3 Rcpp_1.0.6
loaded via a namespace (and not attached):
[1] rstan_2.21.2 tidyselect_1.1.1 remotes_2.4.0 purrr_0.3.4 lattice_0.20-41 V8_3.4.2 colorspace_2.0-1
[8] vctrs_0.3.8 generics_0.1.0 expm_0.999-6 stats4_4.0.3 loo_2.4.1 utf8_1.2.1 rlang_0.4.11
[15] pkgbuild_1.2.0 pillar_1.6.1 glue_1.4.2 withr_2.4.2 matrixStats_0.59.0 lifecycle_1.0.0 mize_0.2.4
[22] plyr_1.8.6 munsell_0.5.0 gtable_0.3.0 codetools_0.2-16 inline_0.3.19 callr_3.7.0 ps_1.6.0
[29] curl_4.3.1 parallel_4.0.3 fansi_0.5.0 scales_1.1.1 RcppParallel_5.1.4 StanHeaders_2.21.0-7 jsonlite_1.7.2
[36] Deriv_4.1.3 gridExtra_2.3 ggplot2_3.3.4 processx_3.5.2 dplyr_1.0.6 cOde_1.0.0 grid_4.0.3
[43] cli_2.5.0 tools_4.0.3 magrittr_2.0.1 tibble_3.1.2 crayon_1.4.1 pkgconfig_2.0.3 ellipsis_0.3.2
[50] Matrix_1.2-18 data.table_1.14.0 prettyunits_1.1.1 R6_2.5.0 compiler_4.0.3
When I try to install the newest versions of RStan and StanHeaders I get an error:
Error: Failed to install 'rstan' from Git:
Could not find tools necessary to compile a package
Call pkgbuild::check_build_tools(debug = TRUE)
to diagnose the problem.
Thanks
The thing that checks the new compiler gave this error:
Syntax error in 'string', line 819, column 97 to column 106, parsing error: Ill-formed function application. Expect comma-separated list of expressions followed by ")" after "(".
Notably, line 819 is less than 97 characters wide.
Hope this helps. The text of the code was automatically generated by ctsem, and the model it specifies is definitely on the complicated side! Stan model code below.
`