# Bus error 10 when running NUTS

**URL:** <https://discourse.pymc.io/t/bus-error-10-when-running-nuts/709>\
**Category:** Questions\
**Created:** [January 7, 2018, 6:39pm UTC](https://discourse.pymc.io/t/bus-error-10-when-running-nuts/709 "2018-01-07T18:39:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ColinMcAuliffe](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@ColinMcAuliffe](https://discourse.pymc.io/u/ColinMcAuliffe)\
**Post date:** [January 7, 2018, 6:39pm UTC](https://discourse.pymc.io/t/bus-error-10-when-running-nuts/709/1 "2018-01-07T18:39:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ColinMcAuliffe](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@ColinMcAuliffe](https://discourse.pymc.io/u/ColinMcAuliffe)\
**Post date:** [January 7, 2018, 7:00pm UTC](https://discourse.pymc.io/t/bus-error-10-when-running-nuts/709/2 "2018-01-07T19:00:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [January 7, 2018, 7:24pm UTC](https://discourse.pymc.io/t/bus-error-10-when-running-nuts/709/3 "2018-01-07T19:24:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ColinMcAuliffe](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@ColinMcAuliffe](https://discourse.pymc.io/u/ColinMcAuliffe)\
**Post date:** [January 7, 2018, 8:57pm UTC](https://discourse.pymc.io/t/bus-error-10-when-running-nuts/709/4 "2018-01-07T20:57:55Z")

</div>

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!
