Rstan crashes after first iteration on one of two Windows machines

EDIT: PROBLEM RESOLVED SPONTANEOUSLY

Logging on remotely to my office computer the program seems to run - not sure if I should delete the error message and not sure how I would do so within the system. Just wanted to make sure no one would spend unnecessary time looking into this in detail.

Ole


I’m working on a Stan program described in more detail here. After getting help from this discussion board, the model compiles and runs with 500 observations on one windows machine - but on the other windows machine it crashes every time if I include 4 or more observations. Unfortunately, it is the crashing machine that I primarily work on…

The details for the machine that crashes is below - the machine that works is a virtual machine on a server running Windows 7 Eneterprise. Rstan, R and Rstudio are the same versions on both. The program file and a dataset are attached below. The content of two diagnostic files that a popup window called “R for Windows front-end” claims will help describe the problem are included below.

If I run with a single chain, the R-session crashes. If I run multiple chains on multicore each chain crashes - returning the following to the console:

In file included from D:/olejr/R/win-library/3.4/BH/include/boost/config.hpp:39:0,
from D:/olejr/R/win-library/3.4/BH/include/boost/math/tools/config.hpp:13,
from D:/olejr/R/win-library/3.4/StanHeaders/include/stan/math/rev/core/var.hpp:7,
from D:/olejr/R/win-library/3.4/StanHeaders/include/stan/math/rev/core/gevv_vvv_vari.hpp:5,
from D:/olejr/R/win-library/3.4/StanHeaders/include/stan/math/rev/core.hpp:12,
from D:/olejr/R/win-library/3.4/StanHeaders/include/stan/math/rev/mat.hpp:4,
from D:/olejr/R/win-library/3.4/StanHeaders/include/stan/math.hpp:4,
from D:/olejr/R/win-library/3.4/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file3a1c67bb1ac8.cpp:8:
D:/olejr/R/win-library/3.4/BH/include/boost/config/compiler/gcc.hpp:186:0: warning: “BOOST_NO_CXX11_RVALUE_REFERENCES” redefined

define BOOST_NO_CXX11_RVALUE_REFERENCES

^
:0:0: note: this is the location of the previous definition
Error in unserialize(socklist[[n]]) : error reading from connection
Error in serialize(data, node$con, xdr = FALSE) :
error writing to connection

In the Viewer-window that tells me how the chains are coming along, I can see that the model starts the first iteration and then crashes:

Click the Refresh button to see progress of the chains
starting worker pid=11000 on localhost:11142 at 14:41:21.347
starting worker pid=4844 on localhost:11142 at 14:41:21.487

SAMPLING FOR MODEL ‘simple bayesian crash thc - culp_log_transformed’ NOW (CHAIN 1).

Gradient evaluation took 0 seconds
1000 transitions using 10 leapfrog steps per transition would take 0 seconds.
Adjust your expectations accordingly!

Iteration: 1 / 2000 [ 0%] (Warmup)

SAMPLING FOR MODEL ‘simple bayesian crash thc - culp_log_transformed’ NOW (CHAIN 2).

Gradient evaluation took 0 seconds
1000 transitions using 10 leapfrog steps per transition would take 0 seconds.
Adjust your expectations accordingly!

Iteration: 1 / 2000 [ 0%] (Warmup)

The first diagnostic file:

(Edit: Don’t know why the contents are not showing up - I see them in my edit window but not my preview window - a screenshot of the contents is here)

<?xml version="1.0" encoding="UTF-16"?>

The second diagnostic file:

<?xml version="1.0" encoding="UTF-16"?> 6.1 7601 Service Pack 1 (0x30): Windows 7 Professional Professional 7601.23796.amd64fre.win7sp1_ldr.170427-1518 1130 Multiprocessor Free X64 1033 14876 C:\Program Files\RStudio\bin\x64\rsession.exe "C:\Program Files\RStudio\bin\x64\rsession.exe" --config-file none --program-mode desktop --www-port 19021 APPCRASH Rscript.exe 3.40.7034.0 58fa1796 file337c4b785eb4.dll 0.0.0.0 59315a42 c0000005 00000000000bf6c7 6.1.7601.2.1.0.256.48 1044 054f 054f8585fec45487aabd6e210db0b730 90b2 90b2ee93a6a1574b8f8defec50492887 CE926385-5D49-4E20-AA77-C4D26773A911 1028_Dell_WOR_3420 Dell Inc. Precision Tower 3420 1.3.2

Operating System: Windows 7 professional

Interface Version: rstan 2.15.1

Output of writeLines(readLines(file.path(Sys.getenv(“HOME”), “.R/Makevars”))):
CXXFLAGS=-O3 -mtune=native -Wno-unused-variable -Wno-unused-function

CXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function

Output of devtools::session_info("rstan”):

Session info -------------------------------------------------------------------------------------------
setting value
version R version 3.4.0 (2017-04-21)
system x86_64, mingw32
ui RStudio (1.0.143)
language (EN)
collate Norwegian (Bokmål)_Norway.1252
tz Europe/Berlin
date 2017-06-02

Packages -----------------------------------------------------------------------------------------------
package * version date source
assertthat 0.2.0 2017-04-11 CRAN (R 3.4.0)
BH 1.62.0-1 2016-11-19 CRAN (R 3.4.0)
colorspace 1.3-2 2016-12-14 CRAN (R 3.4.0)
dichromat 2.0-0 2013-01-24 CRAN (R 3.4.0)
digest 0.6.12 2017-01-27 CRAN (R 3.4.0)
ggplot2 * 2.2.1 2016-12-30 CRAN (R 3.4.0)
graphics * 3.4.0 2017-04-21 local
grDevices * 3.4.0 2017-04-21 local
grid 3.4.0 2017-04-21 local
gridExtra 2.2.1 2016-02-29 CRAN (R 3.4.0)
gtable 0.2.0 2016-02-26 CRAN (R 3.4.0)
inline 0.3.14 2015-04-13 CRAN (R 3.4.0)
labeling 0.3 2014-08-23 CRAN (R 3.4.0)
lattice 0.20-35 2017-03-25 CRAN (R 3.4.0)
lazyeval 0.2.0 2016-06-12 CRAN (R 3.4.0)
magrittr 1.5 2014-11-22 CRAN (R 3.4.0)
MASS 7.3-47 2017-02-26 CRAN (R 3.4.0)
Matrix 1.2-9 2017-03-14 CRAN (R 3.4.0)
methods * 3.4.0 2017-04-21 local
munsell 0.4.3 2016-02-13 CRAN (R 3.4.0)
plyr 1.8.4 2016-06-08 CRAN (R 3.4.0)
RColorBrewer 1.1-2 2014-12-07 CRAN (R 3.4.0)
Rcpp 0.12.11 2017-05-22 CRAN (R 3.4.0)
RcppEigen 0.3.3.3.0 2017-05-01 CRAN (R 3.4.0)
reshape2 1.4.2 2016-10-22 CRAN (R 3.4.0)
rlang 0.1.1 2017-05-18 CRAN (R 3.4.0)
rstan * 2.15.1 2017-04-19 CRAN (R 3.4.0)
scales 0.4.1 2016-11-09 CRAN (R 3.4.0)
StanHeaders * 2.15.0-1 2017-04-19 CRAN (R 3.4.0)
stats * 3.4.0 2017-04-21 local
stats4 3.4.0 2017-04-21 local
stringi 1.1.5 2017-04-07 CRAN (R 3.4.0)
stringr 1.2.0 2017-02-18 CRAN (R 3.4.0)
tibble 1.3.1 2017-05-17 CRAN (R 3.4.0)
tools 3.4.0 2017-04-21 local
utils * 3.4.0 2017-04-21 local

1 Like

Thanks much for reporting back.

I marked this as a solution because I couldn’t marke the original post. See the first post above by @Ole_Rogeberg