Open knappa opened 2 years ago
Trying this again on another box that has python 3.9 instead of 3.10, I also see this output:
Sampling: 0%
double free or corruption (out)
Sampling: 0% (2/8000)
right before the python trace.
Interesting. Thanks for the report. Haven't seen this before.
I assume you have plenty of memory, right? Compiling the model can require a few GB of memory.
We do not currently test on Debian testing. There could be some incompatibility with the newest gcc or libstdc++.
Yes, plenty of memory. Compiling seems fine (I'm assuming that's what the build method does), the error seems to be that the generated executable segfaults, since it crashes on the sampling step.
This guess is based on trying the same model with cmdstan, which outputs:
method = sample (Default)
sample
num_samples = 1000 (Default)
num_warmup = 1000 (Default)
save_warmup = 0 (Default)
thin = 1 (Default)
adapt
engaged = 1 (Default)
gamma = 0.050000000000000003 (Default)
delta = 0.80000000000000004 (Default)
kappa = 0.75 (Default)
t0 = 10 (Default)
init_buffer = 75 (Default)
term_buffer = 50 (Default)
window = 25 (Default)
algorithm = hmc (Default)
hmc
engine = nuts (Default)
nuts
max_depth = 10 (Default)
metric = diag_e (Default)
metric_file = (Default)
stepsize = 1 (Default)
stepsize_jitter = 0 (Default)
num_chains = 1 (Default)
id = 1 (Default)
data
file = getting-started/example.json
init = 2 (Default)
random
seed = 2272506336 (Default)
output
file = output.csv (Default)
diagnostic_file = (Default)
refresh = 100 (Default)
sig_figs = -1 (Default)
profile_file = profile.csv (Default)
log_prob_output_file = log_prob_output.csv (Default)
num_threads = 1 (Default)
Gradient evaluation took 4e-06 seconds
1000 transitions using 10 leapfrog steps per transition would take 0.04 seconds.
Adjust your expectations accordingly!
Iteration: 1 / 2000 [ 0%] (Warmup)
Segmentation fault
I have been able to get some examples in cmdstan working, but not this one.
For reference, my compiler versions:
gcc (Debian 12.2.0-3) 12.2.0
Debian clang version 15.0.0-2
This might be a bug against Stan C++. If you post the segfault-causing cmdstan version on the Stan forums, I suspect this will get plenty of attention. https://discourse.mc-stan.org/
Thanks again for the report.
I ran into the following errors and warnings, while trying to get started with stan/pystan using the documentation at https://pystan.readthedocs.io/en/latest/ This is what is there now:
Running the above, we get the following messages from the
stan.build
function:Then
posterior.sample
fails with:This is on a debian box (version=testing), running pystan 3.5.0, installed through pip.
Originally posted by @knappa in https://github.com/stan-dev/pystan/issues/354#issuecomment-1251231774