Error in unserialize(socklist[[n]]) : error reading from connection Error in serialize(data, node$con, xdr = FALSE) : error writing to connection


#1

I am trying to run sampling for 40 iterations and each time i get the following error:

Error in unserialize(socklist[[n]]) : error reading from connection
Error in serialize(data, node$con, xdr = FALSE) :
error writing to connection
When i try to do it with chains=1 it crushes…

I used all the recommended commands :
rstan_options(auto_write=TRUE)
options(mc.cores=parallel::detectCores())

Output of sessionInfo:
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

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] rstan_2.18.2 StanHeaders_2.18.1 ggplot2_3.1.0

loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 pillar_1.3.1 compiler_3.5.2 plyr_1.8.4 bindr_0.1.1
[6] prettyunits_1.0.2 tools_3.5.2 pkgbuild_1.0.2 tibble_2.0.1 gtable_0.2.0
[11] pkgconfig_2.0.2 rlang_0.3.1 cli_1.0.1 rstudioapi_0.9.0 parallel_3.5.2
[16] yaml_2.2.0 loo_2.0.0 bindrcpp_0.2.2 gridExtra_2.3 withr_2.1.2
[21] dplyr_0.7.8 stats4_3.5.2 grid_3.5.2 tidyselect_0.2.5 glue_1.3.0
[26] inline_0.3.15 R6_2.3.0 processx_3.2.1 purrr_0.2.5 callr_3.1.1
[31] magrittr_1.5 codetools_0.2-15 scales_1.0.0 ps_1.3.0 matrixStats_0.54.0
[36] assertthat_0.2.0 colorspace_1.4-0 lazyeval_0.2.1 munsell_0.5.0 crayon_1.3.4

I would really appreciate any help.
Thanks


#2

When you do chains = 1, is there an error message? Also, are you using integrate_bdf?


#3

No…R crushes ;(


#4

Now it worked normally with chains=1…
Its strange because when i place priors in my hyperparameters in the model and i put chains=1 R crushes…
When i don’t, it only work for chain=1 and for a small amount of iterations.
Is there a way to fix this?
Thank you