ipython 0.13 zmq错误

时间:2013-03-27 21:07:47

标签: ipython pyzmq ipython-parallel

我遇到了ipython集群的怪异行为。计算完成,但许多结果从未到达客户端(并且在完成第一次计算后引擎只是空闲)。

我怀疑zmq出了问题,因为1)我不时会看到以下错误:

  File "/data/misc/nano/python/env_stable/lib/python2.7/site-packages/IPython/parallel/client/asyncresult.py", line 118, in get
    if not self.ready():
  File "/data/misc/nano/python/env_stable/lib/python2.7/site-packages/IPython/parallel/client/asyncresult.py", line 132, in ready
    self.wait(0)
  File "/data/misc/nano/python/env_stable/lib/python2.7/site-packages/IPython/parallel/client/asyncresult.py", line 142, in wait
    self._ready = self._client.wait(self.msg_ids, timeout)
  File "/data/misc/nano/python/env_stable/lib/python2.7/site-packages/IPython/parallel/client/client.py", line 1058, in wait
    self.spin()
  File "/data/misc/nano/python/env_stable/lib/python2.7/site-packages/IPython/parallel/client/client.py", line 1015, in spin
    self._flush_results(self._task_socket)
  File "/data/misc/nano/python/env_stable/lib/python2.7/site-packages/IPython/parallel/client/client.py", line 814, in _flush_results
    idents,msg = self.session.recv(sock, mode=zmq.NOBLOCK)
  File "/data/misc/nano/python/env_stable/lib/python2.7/site-packages/IPython/zmq/session.py", line 642, in recv
    idents, msg_list = self.feed_identities(msg_list, copy)
  File "/data/misc/nano/python/env_stable/lib/python2.7/site-packages/IPython/zmq/session.py", line 673, in feed_identities
    idx = msg_list.index(DELIM)
ValueError: '<IDS|MSG>' is not in list

Additionally IPython.zmq has two test failures:

======================================================================
ERROR: test_send (IPython.zmq.tests.test_session.TestSession)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/clusterdata/python/env_stable/lib/python2.7/site-packages/IPython/zmq/tests/test_session.py", line 76, in test_send
    socket = MockSocket(zmq.Context.instance(),zmq.PAIR)
  File "/clusterdata/python/env_stable/lib/python2.7/site-packages/IPython/zmq/tests/test_session.py", line 34, in __init__
    self.data = []
  File "/clusterdata/python/env_stable/lib/python2.7/site-packages/zmq/sugar/attrsettr.py", line 38, in __setattr__
    self.__class__.__name__, upper_key)
AttributeError: MockSocket has no such option: DATA

======================================================================
ERROR: test_send (IPython.zmq.tests.test_session.TestSession)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/clusterdata/python/env_stable/lib/python2.7/site-packages/zmq/tests/__init__.py", line 108, in tearDown
    raise RuntimeError("context could not terminate, open sockets likely remain in test")
RuntimeError: context could not terminate, open sockets likely remain in test

----------------------------------------------------------------------

我使用pyzmq 13.0.0(由pip安装)和zeromq 3.2.2,由pyzmq的设置编译。我使用ipython 13.1和python 2.7.3。

有什么可能的建议,如果没有,我怎么能找到更多信息,为什么会出现这些错误?

更新:事实证明,减速是由于ipcontroller的一个长任务队列,然后占用了100%的CPU并且可怕地滞后。这是一个单独的问题,但我仍然希望得到有关上述内容的反馈。

1 个答案:

答案 0 :(得分:0)

@minrk在评论中回答。 ZMQ错误并不重要,性能是由于调度,并通过设置TaskScheduler.hwm=0来解决。