Can not pickle fortran object

I am using this blogpost and using their code:

There seem to be a problem with the NUTS sampler:
‘Auto-assigning NUTS sampler…
Initializing NUTS using jitter+adapt_diag…
Multiprocess sampling (3 chains in 4 jobs)
NUTS: [sigma, c_3, period_2, ls_2, period_1, ls_1]’

When compiling I get: c:\users\nilsjj12\appdata\local\programs\python\python37\lib\multiprocessing\ in dump(obj, file, protocol)
58 def dump(obj, file, protocol=None):
59 ‘’‘Replacement for pickle.dump() using ForkingPickler.’’’
—> 60 ForkingPickler(file, protocol).dump(obj)
62 #

TypeError: can’t pickle fortran objects

I have tried the solution from:

When I assess cores=1, it is running, but very slow.

Hi @nils_jakob ,
Good day.
I run the same script and faced the same problem with you.
But I manage to find a solution according to Installing PyMC3 and Theano on Windows 10* using WSL | awhug.
I suspect some problems with theano on windows.
After I set up in ubuntu as per the link, I manage to run more than one core.
Good luck

1 Like