ArtPoon / kamphir

Phylogenetic inference using a tree-shape kernel in an Approximate Bayesian Computation framework
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Pickle crash #18

Closed ArtPoon closed 9 years ago

ArtPoon commented 9 years ago
Traceback (most recent call last):
  File "kamphir.py", line 516, in <module>
    decay=args.toldecay)
  File "kamphir.py", line 363, in abc_mcmc
    next_score = self.evaluate()
  File "kamphir.py", line 310, in evaluate
    async_results = [apply_async(pool, self.compute, args=(tree,)) for tree in trees]
  File "kamphir.py", line 25, in apply_async
    return pool.apply_async(run_dill_encoded, (dill.dumps((fun, args)),))
  File "/Library/Python/2.7/site-packages/dill-0.2.1-py2.7.egg/dill/dill.py", line 143, in dumps
    dump(obj, file, protocol, byref)
  File "/Library/Python/2.7/site-packages/dill-0.2.1-py2.7.egg/dill/dill.py", line 136, in dump
    pik.dump(obj)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 224, in dump
    self.save(obj)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 548, in save_tuple
    save(element)
ArtPoon commented 9 years ago

and eventually...

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/Library/Python/2.7/site-packages/dill-0.2.1-py2.7.egg/dill/dill.py", line 504, in save_module_dict
    StockPickler.save_dict(pickler, obj)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 648, in save_dict
    self.memoize(obj)
RuntimeError: maximum recursion depth exceeded
ArtPoon commented 9 years ago

This may have something to do with constantly respawning new threads in Python multiprocessing -- I was running three instances of Kamphir simultaneously at the time.