rstan icon indicating copy to clipboard operation
rstan copied to clipboard

2.21.2 doesn't run its own example, crashes R.

Open EmmanuelCharpentier opened this issue 4 years ago • 0 comments

Summary:

2.21.2 doesn't run its own example, crashes R.

Description:

rstan can crash R sessions. I discovered it when trying to run a brms model with the rstan backend cmdstanr, model that the cmdstanr backend successfully compiles and fits. Chasing down this bug,

  • I tried to install the latest development version, which failed (see this issue)
  • I (apparently successfully) reinstalled the CRAN versin, but this version fails on its own examples...

Reproducible Steps:

Full transcript of the R session :

R version 4.0.4 (2021-02-15) -- "Lost Library Book"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R est un logiciel libre livré sans AUCUNE GARANTIE.
Vous pouvez le redistribuer sous certaines conditions.
Tapez 'license()' ou 'licence()' pour plus de détails.

R est un projet collaboratif avec de nombreux contributeurs.
Tapez 'contributors()' pour plus d'information et
'citation()' pour la façon de le citer dans les publications.

Tapez 'demo()' pour des démonstrations, 'help()' pour l'aide
en ligne ou 'help.start()' pour obtenir l'aide au format HTML.
Tapez 'q()' pour quitter R.

[Sauvegarde de la session précédente restaurée]

> setwd('/home/charpent/')
> library("rstan")
Le chargement a nécessité le package : StanHeaders
Le chargement a nécessité le package : ggplot2
rstan (Version 2.21.2, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)
> options(mc.cores = parallel::detectCores())
> example(stan_model, package = "rstan", run.dontrun = TRUE)

Process R trappe pour point d'arrêt et de trace at Tue Aug 31 16:30:09 2021

Current Output:

R crash

Expected Output:

Whatever the example is supposed to return...

RStan Version:

The version of RStan you are running (e.g., from packageVersion("rstan"))

R Version:

> sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux bookworm/sid

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.17.so

locale:
 [1] LC_CTYPE=fr_FR.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=fr_FR.UTF-8        LC_COLLATE=fr_FR.UTF-8    
 [5] LC_MONETARY=fr_FR.UTF-8    LC_MESSAGES=fr_FR.UTF-8   
 [7] LC_PAPER=fr_FR.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.4

Operating System:

charpent@p-202-021:~$ uname -a
Linux p-202-021 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux

EmmanuelCharpentier avatar Aug 31 '21 14:08 EmmanuelCharpentier