Bus error 10 when running NUTS

I’m running a large hierarchical multinomial logistic regression and I keep getting bus error 10 when running nuts. I haven’t been able to reproduce the error on a smaller problem and yet and if I can’t make a small example after some more tinkering I’ll upload the full example.

Has anyone encountered this before? Here is the screen output, I’m running 3 chains with 1000 NUTS samples with 500 tuning steps.

Auto-assigning NUTS sampler…
Initializing NUTS using jitter+adapt_diag…
Multiprocess sampling (3 chains in 3 jobs)
NUTS: [whiteUnder40k5, whiteMillenial5, whiteCollege5, whiteFemale5, femaleMillenial5, under40k5, college5, millenial5, white5, female5, sigma_districtMillenial5_log__, delta_districtMillenial5, sigma_stateMill5_log__, delta_stateMill5, sigma_regionMill5_log__, delta_regionMill5, delta_district5, sigma_district5_log__, sigma_district_hyp5_log__, MdInc5, Trump5, delta_state5, sigma_state5_log__, sigma_state_hyp5_log__, sigma_region5_log__, delta_region5, baseline5, whiteUnder40k4, whiteMillenial4, whiteCollege4, whiteFemale4, femaleMillenial4, under40k4, college4, millenial4, white4, female4, sigma_districtMillenial4_log__, delta_districtMillenial4, sigma_stateMill4_log__, delta_stateMill4, sigma_regionMill4_log__, delta_regionMill4, delta_district4, sigma_district4_log__, sigma_district_hyp4_log__, MdInc4, Trump4, delta_state4, sigma_state4_log__, sigma_state_hyp4_log__, sigma_region4_log__, delta_region4, baseline4, whiteUnder40k3, whiteMillenial3, whiteCollege3, whiteFemale3, femaleMillenial3, under40k3, college3, millenial3, white3, female3, sigma_districtMillenial3_log__, delta_districtMillenial3, sigma_stateMill3_log__, delta_stateMill3, sigma_regionMill3_log__, delta_regionMill3, delta_district3, sigma_district3_log__, sigma_district_hyp3_log__, MdInc3, Trump3, delta_state3, sigma_state3_log__, sigma_state_hyp3_log__, sigma_region3_log__, delta_region3, baseline3, whiteUnder40k2, whiteMillenial2, whiteCollege2, whiteFemale2, femaleMillenial2, under40k2, college2, millenial2, white2, female2, sigma_districtMillenial2_log__, delta_districtMillenial2, sigma_stateMill2_log__, delta_stateMill2, sigma_regionMill2_log__, delta_regionMill2, delta_district2, sigma_district2_log__, sigma_district_hyp2_log__, MdInc2, Trump2, delta_state2, sigma_state2_log__, sigma_state_hyp2_log__, sigma_region2_log__, delta_region2, baseline2]
Bus error: 10

I was able to get nuts to run by removing a bunch of variables and by shortening the trace to 100 samples.

So I guess I’m running out of memory here due to a large trace. Is there an option in PYMC3 to do some sort of out of core storage for traces?

You can switch backend to save the trace to file: http://docs.pymc.io/api/backends.html

Ok thank you, I switched to the text backend and still got the error. I had to switch to sequential sampling rather than parallel in addition to the text backend to get it to work. My computer is ~8 years old, might be time to think about a new one!