Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 6th, 2011  |  syntax: None  |  size: 4.96 KB  |  views: 61  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. In [27]: c = Client()
  2.  
  3. In [28]: dview=c[:]
  4.  
  5. In [29]: ar=dview.apply_async(sleep,10)
  6.  
  7. In [30]: c.shutdown(0)
  8.  
  9. In [31]: ar.get()
  10. Out[31]: [None, None, None, None, None, None, None, None, None, None]
  11.  
  12. In [32]: ar=dview.apply_async(sleep,10)
  13.  
  14. In [33]: c.shutdown(1)
  15.  
  16. In [34]: ar.get()
  17. ---------------------------------------------------------------------------
  18. CompositeError                            Traceback (most recent call last)
  19. /Users/maarten/<ipython-input-34-8531eb3d26fb> in <module>()
  20. ----> 1 ar.get()
  21.  
  22. /Library/Python/2.6/site-packages/ipython-0.11-py2.6.egg/IPython/parallel/client/asyncresult.pyc in get(self, timeout)
  23.     101                 return self._result
  24.     102             else:
  25. --> 103                 raise self._exception
  26.     104         else:
  27.     105             raise error.TimeoutError("Result not ready.")
  28.  
  29. CompositeError: one or more exceptions from call to method: sleep
  30. [Engine Exception]EngineError: Engine 0 died while running task '85bef637-5682-48f0-92c0-5cf9652db4ba'
  31.  
  32. In [35]: ar=dview.apply_async(sleep,10)
  33. ---------------------------------------------------------------------------
  34. KeyError                                  Traceback (most recent call last)
  35. /Users/maarten/<ipython-input-35-1779b888dcf5> in <module>()
  36. ----> 1 ar=dview.apply_async(sleep,10)
  37.  
  38. /Library/Python/2.6/site-packages/ipython-0.11-py2.6.egg/IPython/parallel/client/view.pyc in apply_async(self, f, *args, **kwargs)
  39.     214         returns AsyncResult
  40.     215         """
  41. --> 216         return self._really_apply(f, args, kwargs, block=False)
  42.     217
  43.     218     @spin_after
  44.  
  45. /Users/maarten/<string> in _really_apply(self, f, args, kwargs, targets, block, track)
  46.  
  47. /Library/Python/2.6/site-packages/ipython-0.11-py2.6.egg/IPython/parallel/client/view.pyc in sync_results(f, self, *args, **kwargs)
  48.      55 def sync_results(f, self, *args, **kwargs):
  49.      56     """sync relevant results from self.client to our results attribute."""
  50. ---> 57     ret = f(self, *args, **kwargs)
  51.      58     delta = self.outstanding.difference(self.client.outstanding)
  52.      59     completed = self.outstanding.intersection(delta)
  53.  
  54. /Users/maarten/<string> in _really_apply(self, f, args, kwargs, targets, block, track)
  55.  
  56. /Library/Python/2.6/site-packages/ipython-0.11-py2.6.egg/IPython/parallel/client/view.pyc in save_ids(f, self, *args, **kwargs)
  57.      44     n_previous = len(self.client.history)
  58.      45     try:
  59. ---> 46         ret = f(self, *args, **kwargs)
  60.      47     finally:
  61.      48         nmsgs = len(self.client.history) - n_previous
  62.  
  63. /Library/Python/2.6/site-packages/ipython-0.11-py2.6.egg/IPython/parallel/client/view.pyc in _really_apply(self, f, args, kwargs, targets, block, track)
  64.     516         targets = self.targets if targets is None else targets
  65.     517
  66. --> 518         _idents = self.client._build_targets(targets)[0]
  67.     519         msg_ids = []
  68.     520         trackers = []
  69.  
  70. /Library/Python/2.6/site-packages/ipython-0.11-py2.6.egg/IPython/parallel/client/client.pyc in _build_targets(self, targets)
  71.     464             raise TypeError("targets by int/slice/collection of ints only, not %s"%(type(targets)))
  72.     465
  73. --> 466         return [util.asbytes(self._engines[t]) for t in targets], list(targets)
  74.     467
  75.     468     def _connect(self, sshserver, ssh_kwargs, timeout):
  76.  
  77. /Library/Python/2.6/site-packages/ipython-0.11-py2.6.egg/IPython/parallel/util.pyc in __getitem__(self, key)
  78.      79             return dict.__getitem__(self, key)
  79.      80         except KeyError:
  80. ---> 81             return self._reverse[key]
  81.      82
  82.      83     def __setitem__(self, key, value):
  83.  
  84. KeyError: 0
  85.  
  86. In [36]: dview=c[:]
  87. ---------------------------------------------------------------------------
  88. IndexError                                Traceback (most recent call last)
  89. /Users/maarten/<ipython-input-36-25710ae84c54> in <module>()
  90. ----> 1 dview=c[:]
  91.  
  92. /Library/Python/2.6/site-packages/ipython-0.11-py2.6.egg/IPython/parallel/client/client.pyc in __getitem__(self, key)
  93.     766             raise TypeError("key by int/slice/iterable of ints only, not %s"%(type(key)))
  94.     767         else:
  95. --> 768             return self.direct_view(key)
  96.     769
  97.     770     #--------------------------------------------------------------------------
  98.  
  99.  
  100. /Library/Python/2.6/site-packages/ipython-0.11-py2.6.egg/IPython/parallel/client/client.pyc in direct_view(self, targets)
  101.    1042         """
  102.    1043         single = isinstance(targets, int)
  103. -> 1044         targets = self._build_targets(targets)[1]
  104.    1045         if single:
  105.    1046             targets = targets[0]
  106.  
  107. /Library/Python/2.6/site-packages/ipython-0.11-py2.6.egg/IPython/parallel/client/client.pyc in _build_targets(self, targets)
  108.     459             indices = range(len(self._ids))[targets]
  109.     460             ids = self.ids
  110. --> 461             targets = [ ids[i] for i in indices ]
  111.     462
  112.     463         if not isinstance(targets, (tuple, list, xrange)):
  113.  
  114. IndexError: list index out of range
clone this paste RAW Paste Data