Dear brms users and creators,
I would be very thankful if you could point me to any potentially helpful thoughts about the following:
Short summary of the problem:
I have tried to install brms on my Ubuntu machine. It was quite inconvenient (“dependency hell”, quite some manual patching of this and that), and in the end after a restart of RStudio the installation of brms finished without complaints.
As far as I can tell, rstan has also been successfully installed. I can run this test script without problems.
However, when I run a fairly simple model,
Code (happens both in RStudio & running script from shell via Rscript):
mdl0 <- brm(y ~ a + b + c,
data = Data,
family = Beta(link = "logit", link_phi = "log"),
chains = 1,
warmup = 1000,
cores = 1,
iter = 2000)
Results in the following output:
Compiling Stan program...
Start sampling
SAMPLING FOR MODEL '6c9a0d5a4fd701d932ade703e8e7bfc2' NOW (CHAIN 1).
Chain 1:
Chain 1: Gradient evaluation took 0.002253 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 22.53 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1:
Chain 1:
double free or corruption (out)
If I change the family to gaussian, i.e. run this model:
mdlGauss <- brm(y ~ a + b + c,
data = Data,
family = gaussian(),
chains = 1,
warmup = 1000,
cores = 1,
iter = 2000)
It finishes without problems.
When I run the basic demo script from the brms github page, i.e.:
fit1 <- brm(count ~ zAge + zBase * Trt + (1|patient),
data = epilepsy, family = poisson())
I get the following output (there are a few more lines, but I cannot copy them as “R encountered a fatal error. The session was terminated”).
Compiling Stan program...
Start sampling
SAMPLING FOR MODEL '58b43e7972874ac46e71dffc8a4f2faf' NOW (CHAIN 1).
Chain 1:
Chain 1: Gradient evaluation took 3.8e-05 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.38 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1:
Chain 1:
Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup)
Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup)
Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup)
Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup)
Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup)
Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup)
Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling)
Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling)
Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling)
Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling)
Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling)
Chain 1: Iteration: 2000 / 2000 [100%] (Sampling)
Chain 1:
Chain 1: Elapsed Time: 1.53635 seconds (Warm-up)
Chain 1: 1.18233 seconds (Sampling)
Chain 1: 2.71868 seconds (Total)
Chain 1:
SAMPLING FOR MODEL '58b43e7972874ac46e71dffc8a4f2faf' NOW (CHAIN 2).
Chain 2:
Chain 2: Gradient evaluation took 2.1e-05 seconds
Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.21 seconds.
Chain 2: Adjust your expectations accordingly!
Chain 2:
Chain 2:
Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup)
Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup)
Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup)
Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup)
Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup)
Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup)
Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling)
Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling)
Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling)
Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling)
Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling)
Chain 2: Iteration: 2000 / 2000 [100%] (Sampling)
Chain 2:
Chain 2: Elapsed Time: 1.66488 seconds (Warm-up)
Chain 2: 1.2286 seconds (Sampling)
Chain 2: 2.89348 seconds (Total)
Chain 2:
SAMPLING FOR MODEL '58b43e7972874ac46e71dffc8a4f2faf' NOW (CHAIN 3).
Chain 3:
Chain 3: Gradient evaluation took 2.1e-05 seconds
Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 0.21 seconds.
Chain 3: Adjust your expectations accordingly!
Chain 3:
Chain 3:
Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup)
[22530:22530:20230117,112805.807411:ERROR process_memory_range.cc:86] read out of range
[22530:22530:20230117,112805.807441:ERROR elf_image_reader.cc:558] missing nul-terminator
[22530:22530:20230117,112805.807465:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808230:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808245:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808260:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808275:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808290:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808305:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808430:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808445:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808585:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808601:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808618:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808633:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808649:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808666:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808681:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808697:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808712:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808727:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808742:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808758:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808773:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808789:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808805:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808820:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808837:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808853:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808869:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808885:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808899:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808915:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808930:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808945:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808961:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808976:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.808992:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809007:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809023:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809039:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809052:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809068:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809082:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809099:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809115:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809129:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809145:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809160:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:22530:20230117,112805.809175:ERROR elf_dynamic_array_reader.h:61] tag not found
[22530:225
[...]
At the very end of this output, it reports (copied manually, as R session already dead):
22530:22531:20230117,112805.830005:ERROR directory_reader_posix.cc:42] opendir: No such file or directory (2)
Problematic environment details where these bugs occur:
- Operating System: ubuntu 22.04.1 LTS
- R: 4.2.2
- RStudio: 2022.12.0 Build 353
- brms Version: 2.18.0
All of the above scripts successfully run on a macbook with the following environment:
- Operating System: Mac OS Ventura 13.0.1
- R: 4.2.2
- RStudio: 2022.12.0+353
- brms Version: 2.18.0
Any help to diagnose what is going on and tips for how I could fix this would be very welcome!
Many many thanks,
Christoph