> ## test specifying pars
> fit3 <- stan(model_code = code2, data = list(J = 3))
*** caught segfault ***
address 0x1c, cause 'memory not mapped'
Traceback:
1: FUN("_rcpp_module_boot_stan_fit4modelf48279244a44_1c4d801fe5862beae92c16a521074a96_mod"[[1L]], ...)
2: lapply(name, function(id) { v <- .Internal(getSymbolInfo(as.character(id), PACKAGE, as.logical(withRegistrationInfo))) if (is.null(v)) { msg <- paste("no such symbol", id) if (length(pkgName) && nzchar(pkgName)) msg <- paste(msg, "in package", pkgName) stop(msg, domain = NA) } names(v) <- c("name", "address", "package", "numParameters")[seq_along(v)] v})
3: getNativeSymbolInfo(name, PACKAGE)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(getNativeSymbolInfo(name, PACKAGE), error = function(e) e)
8: Module(module, mustStart = TRUE)
9: .getModulePointer(x)
10: <S4 object of class "Module">$stan_fit4modelf48279244a44_1c4d801fe5862beae92c16a521074a96
11: eval(expr, envir, enclos)
12: eval(call("$", mod, paste("stan_fit4", model_cppname, sep = "")))
13: .local(object, ...)
14: sampling(sm, data, pars, chains, iter, warmup, thin, seed, init, check_data = TRUE, sample_file = sample_file, diagnostic_file = diagnostic_file, verbose = verbose, algorithm = match.arg(algorithm), control = control, check_unknown_args = FALSE, cores = cores, open_progress = open_progress, ...)
15: sampling(sm, data, pars, chains, iter, warmup, thin, seed, init, check_data = TRUE, sample_file = sample_file, diagnostic_file = diagnostic_file, verbose = verbose, algorithm = match.arg(algorithm), control = control, check_unknown_args = FALSE, cores = cores, open_progress = open_progress, ...)
16: stan(model_code = code2, data = list(J = 3))
aborting …
Ben, can you try to see if it is reproducible? This seems to be a problem with rstan.
It seems to be fine with rstan 2.6.0.