# What is the maximum of the trace? and saving with pickle?

**URL:** <https://discourse.pymc.io/t/what-is-the-maximum-of-the-trace-and-saving-with-pickle/1326>\
**Category:** Questions\
**Created:** [June 3, 2018, 2:46pm UTC](https://discourse.pymc.io/t/what-is-the-maximum-of-the-trace-and-saving-with-pickle/1326 "2018-06-03T14:46:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HenryTeng](https://avatars.discourse-cdn.com/v4/letter/h/90ced4/32.png) [@HenryTeng](https://discourse.pymc.io/u/HenryTeng)\
**Post date:** [June 3, 2018, 2:46pm UTC](https://discourse.pymc.io/t/what-is-the-maximum-of-the-trace-and-saving-with-pickle/1326/1 "2018-06-03T14:46:22Z")

</div>

Hi,

I mainly three questions as follow.

The first one is,  
What is the maximum of the trace in pymc3?  
After I generated a trace with more than 20 free parameters and length of 5 million with 4 chains, it tells me like this:  
multiprocessing.pool.MaybeEncodingError: Error sending result: ‘[\<pymc3.backends.ndarray.NDArray object at 0x1c524d9f28\>]’. Reason: ‘error("‘i’ format requires -2147483648 \<= number \<= 2147483647",)’  
and finally failed.

Then, I also tried the same length and parameter situation of only one chain, it is okay to finish the trace, but when I wanted to save it with pickle, it saids  
pickle.dump({‘model’: basic\_model, ‘trace’: trace}, buff)  
OSError: [Errno 22] Invalid argument

The reason why I generate a chain like that is due to the relatively complicated model. The chain is hard to converge quickly with MH-sampling with this model. I tried the NUTS sampling but it IS NO USE because it got stuck and never finished when generating a nuts-sampling with my model.

Is there any idea about these kinds of problem?

Thank you very much!
