Operating System: OS X 10.12.6, R version 3.4.2
Interface Version: 2.17.2
Output of writeLines(readLines(file.path(Sys.getenv(“HOME”), “.R/Makevars”))):
CXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -Wno-macro-redefined
CC=clang
CXX=clang++ -arch x86_64 -ftemplate-depth-256
I’m trying to fit the relatively simple model
data {
int N;
int R;
}
generated quantities {
real<lower=0> lambda[R];
int y[R, N];
for (r in 1:R) {
lambda[r] = fabs(normal_rng(0, 5));
for (n in 1:N)
y[r, n] = poisson_rng(lambda[r]);
}
}
with the command
R <- 10000
N <- 1000
simu_data <- list("N" = N, "R" = R)
fit <- stan(file=‘example.stan', data=simu_data, iter=1,
chains=1, seed=4938483, algorithm="Fixed_param")
It’s a hefty array but should no problem fitting in memory. But when the call to stan
returns an empty fit object and if I try to run again the R OS X application crashes.
Any ideas what’s up?