I’m getting a mysterious error message when trying to sample from a very model. The error is
"Error in sampler$call_sampler(args_list[[i]]) : " " c++ exception (unknown reason)"
This is the model:
data {
int<lower=1> u_J;
}
parameters {
vector<lower=0>[u_J] u_gamma;
real<lower=0> u_sigma_gamma;
}
model {
u_gamma ~ lognormal(0, u_sigma_gamma);
u_sigma_gamma ~ std_normal();
}
If I replace the scale parameter in the lognormal with, say, 1 - it samples without a problem. If I replace the lognormal with a normal - it samples without a problem.
I have been able to use hierarchical lognormals in the past… I tried reinstalling RStan from source, and reinstalling the toolchain.
Any ideas much appreciated!
- macOS Mojave 10.14.6
- RStan 2.19.3
- Output of
writeLines(readLines(file.path(Sys.getenv("HOME"), ".R/Makevars")))
# clang: start
CFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CCFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CXXFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
CPPFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include
SHLIB_CXXLDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib
SHLIB_CXX14LDFLAGS+=-Wl,-rpath,${R_HOME}/lib ${R_HOME}/lib/libc++abi.1.dylib
# clang: end
- Output of
devtools::session_info("rstan")
─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
setting value
version R version 3.6.0 (2019-04-26)
os macOS Mojave 10.14.6
system x86_64, darwin15.6.0
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz America/New_York
date 2020-04-23
─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
package * version date lib source
assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.0)
backports 1.1.6 2020-04-05 [1] CRAN (R 3.6.2)
BH 1.72.0-3 2020-01-08 [1] CRAN (R 3.6.0)
callr 3.4.3 2020-03-28 [1] CRAN (R 3.6.2)
checkmate 2.0.0 2020-02-06 [1] CRAN (R 3.6.0)
cli 2.0.2 2020-02-28 [1] CRAN (R 3.6.0)
colorspace 1.4-1 2019-03-18 [1] CRAN (R 3.6.0)
crayon 1.3.4 2017-09-16 [1] CRAN (R 3.6.0)
desc 1.2.0 2018-05-01 [1] CRAN (R 3.6.0)
digest 0.6.25 2020-02-23 [1] CRAN (R 3.6.0)
ellipsis 0.3.0 2019-09-20 [1] CRAN (R 3.6.0)
evaluate 0.14 2019-05-28 [1] CRAN (R 3.6.0)
fansi 0.4.1 2020-01-08 [1] CRAN (R 3.6.0)
farver 2.0.3 2020-01-16 [1] CRAN (R 3.6.0)
ggplot2 * 3.3.0 2020-03-05 [1] CRAN (R 3.6.0)
glue 1.4.0 2020-04-03 [1] CRAN (R 3.6.2)
gridExtra 2.3 2017-09-09 [1] CRAN (R 3.6.0)
gtable 0.3.0 2019-03-25 [1] CRAN (R 3.6.0)
inline 0.3.15 2018-05-18 [1] CRAN (R 3.6.0)
isoband 0.2.1 2020-04-12 [1] CRAN (R 3.6.2)
labeling 0.3 2014-08-23 [1] CRAN (R 3.6.0)
lattice 0.20-41 2020-04-02 [1] CRAN (R 3.6.2)
lifecycle 0.2.0 2020-03-06 [1] CRAN (R 3.6.0)
loo 2.2.0 2019-12-19 [1] CRAN (R 3.6.0)
magrittr 1.5 2014-11-22 [1] CRAN (R 3.6.0)
MASS 7.3-51.5 2019-12-20 [1] CRAN (R 3.6.0)
Matrix 1.2-18 2019-11-27 [1] CRAN (R 3.6.0)
matrixStats 0.56.0 2020-03-13 [1] CRAN (R 3.6.0)
mgcv 1.8-31 2019-11-09 [1] CRAN (R 3.6.0)
munsell 0.5.0 2018-06-12 [1] CRAN (R 3.6.0)
nlme 3.1-147 2020-04-13 [1] CRAN (R 3.6.2)
pillar 1.4.3 2019-12-20 [1] CRAN (R 3.6.0)
pkgbuild 1.0.6 2019-10-09 [1] CRAN (R 3.6.0)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 3.6.0)
pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.6.0)
praise 1.0.0 2015-08-11 [1] CRAN (R 3.6.0)
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 3.6.0)
processx 3.4.2 2020-02-09 [1] CRAN (R 3.6.0)
ps 1.3.2 2020-02-13 [1] CRAN (R 3.6.0)
R6 2.4.1 2019-11-12 [1] CRAN (R 3.6.0)
RColorBrewer 1.1-2 2014-12-07 [1] CRAN (R 3.6.0)
Rcpp 1.0.4.6 2020-04-09 [1] CRAN (R 3.6.0)
RcppEigen 0.3.3.7.0 2019-11-16 [1] CRAN (R 3.6.0)
rlang 0.4.5 2020-03-01 [1] CRAN (R 3.6.0)
rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.6.0)
rstan * 2.19.3 2020-02-11 [1] CRAN (R 3.6.0)
rstudioapi 0.11 2020-02-07 [1] CRAN (R 3.6.0)
scales 1.1.0 2019-11-18 [1] CRAN (R 3.6.0)
StanHeaders * 2.21.0-1 2020-01-19 [1] CRAN (R 3.6.0)
testthat 2.3.2 2020-03-02 [1] CRAN (R 3.6.0)
tibble 3.0.0 2020-03-30 [1] CRAN (R 3.6.2)
utf8 1.1.4 2018-05-24 [1] CRAN (R 3.6.0)
vctrs 0.2.4 2020-03-10 [1] CRAN (R 3.6.0)
viridisLite 0.3.0 2018-02-01 [1] CRAN (R 3.6.0)
withr 2.1.2 2018-03-15 [1] CRAN (R 3.6.0)
[1] /Library/Frameworks/R.framework/Versions/3.6/Resources/library