R Session Aborted

When I run sampling() function for a (hierarchical) model,
about half of them fails with the following error :(R session aborted).
Sometimes succeeds without the error, but sometimes fails with the error (, the success rate is 50%~10%?).
But for another model, the error does not occur, so, I guess it causes my Stan program.


The sampling failure always occurs in the following step, so it cannot go out from the warmup.

I am not sure but the following relates?

> writeLines(readLines(file.path(Sys.getenv("HOME"), ".R/Makevars")))
CXX14 = "C:\Rtools\mingw_64\bin\g++.exe"

CXX14FLAGS=-O3 -Wno-unused-variable -Wno-unused-function
CXX14 = g++ -std=c++1y

CXXFLAGS= -g0 -O3 -Wall
MAKE=make -j4


CXX14FLAGS=-O3 -Wno-unused-variable -Wno-unused-function
CXX14 = g++ -std=c++1y

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

Have you tried to run it in R directly and thus check to see if this has to do with RStudio?

Yes, from R console (not R studio), the error occurs.

Well the warning message corresponds to bad initial start values for the sampling. I think you need to provide a complete minimum working example.

Now, I do not have a minimal example, but the code is given by the following;

# This is data

# Run rstan::sampling(), and fit a model to the above data
f <- fit_Bayesian_FROC( ite  = 111,  cha = 1, summary = T, dataList = dd )

# Show Stan file