Dear Stan Group,
When I run the attached MPLN.R and mpln.stan code via RStudio Version 1.0.136 (R version 3.3.2), code starts compiling then I get an error saying that R encountered a fatal error and the session is being aborted. I'm using a MacBook Pro with OSX 10.11.5, 16GB RAM, 2.9 GHz. However, my friend can run the exact code in her MacBook with no issues and produce perfect results.
I found an RStan user with similar issue as mine: https://github.com/stan-dev/rstan/issues/115 According to him, changes to Makevars helped him, even though specifics are not given. I also tried running the code through terminal and the following error is produced. Any help is appreciated. I have attached .R, .stan, Makevars and data files.
Thanks,
A.Silva
Error when run on terminal:
*** caught segfault ***
address 0x1c, cause 'memory not mapped'
Traceback:
1: FUN(X[[i]], ...)
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_fit4model32209064082_trial6_vector
11: eval(expr, envir, enclos)
12: eval(call("$", mod, paste("stan_fit4", model_cppname, sep = "")))
13: object@mk_cppmodule(object)
14: .local(object, ...)
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, include = include, ...)
16: 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, include = include, ...)
17: stan(file = "trial6_vector.stan", data = data1, iter = 100, chains = 1, verbose = FALSE, refresh = -1)
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
version of the C++ compiler
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X El Capitan 10.11.5
locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] edgeR_3.14.0 limma_3.28.21 mclust_5.2
[4] mnormt_1.5-4 mvtnorm_1.0-5 rstan_2.14.1
[7] StanHeaders_2.14.0-1 ggplot2_2.2.1
loaded via a namespace (and not attached):
[1] Rcpp_0.12.9 codetools_0.2-15 assertthat_0.1
[4] grid_3.3.2 plyr_1.8.4 gtable_0.2.0
[7] stats4_3.3.2 scales_0.4.1 lazyeval_0.2.0
[10] tools_3.3.2 munsell_0.4.3 parallel_3.3.2
[13] inline_0.3.14 colorspace_1.2-6 gridExtra_2.2.1
[16] tibble_1.2
Thank you for the suggestion, Ben! I tried running data on Rstudio few different times. Majority of the time, now the program works. However, a few times RStudio stops part way with the error "R encountered a fatal error. The session was terminated".
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/66dgsQfr1GY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
To post to this group, send email to stan-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
With Rstudio, it crashed the first time after I tried your suggestion. Second or third try, it started working fine and I was able to completely run the program. But once in a while, it still crash.
On Wed, Feb 15, 2017 at 2:17 PM, Ben Goodrich <goodri...@gmail.com> wrote:
On Wednesday, February 15, 2017 at 1:24:36 PM UTC-5, a silva wrote:Thank you for the suggestion, Ben! I tried running data on Rstudio few different times. Majority of the time, now the program works. However, a few times RStudio stops part way with the error "R encountered a fatal error. The session was terminated".
That is a hard thing to diagnose. It may be the case that your disk is starting to be unpredictable. Does it crash on the first run or subsequent runs of the same model?
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/66dgsQfr1GY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
Hi, I don't want to drive this off-topic, but I encountered troubles installing stan from github. I think the error is unrelated to the present discussion, but I'm having some trouble navigating. I used
install_github("stan-dev/rstan",subdir = "rstan/rstan")
and get the following error (which I've truncated):
stanc.cpp:4:10: fatal error: 'stan/version.hpp' file not found
#include <stan/version.hpp>
Very curious. I had 2.14.0-1 of StanHeaders from CRAN installed when I got the above error.
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/66dgsQfr1GY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.