[SciPy-user] Parallel OO programming in Python.

Flavio Coelho fccoelho at gmail.com
Mon Nov 6 11:30:03 CST 2006


Hi Brian,

Sorry for taking so long to answer, I was very busy. I have tried again
after updating ZopeInterface  to the version you suggest, and Twisted and
Nevow to SVN trunk. The error message I am getting is pretty much the same.
I also tried running the tests. Here is the output of "trial ipython1":

# trial ipython1
Running 29 tests.

/usr/lib/python2.4/site-packages/twisted/trial/runner.py:243:
exceptions.DeprecationWarning: log.startKeepingErrors is deprecated since
Twisted 2.5
ipython1.test.test_controllerpb
  BasicControllerPBTest
    testDeferreds ...
[ERROR]
    testExecute ...
[ERROR]
    testInterfaces ...
[ERROR]
    testPullNamespace ...
[ERROR]
    testPushPull ...
[ERROR]
    testPushPullSerialized ...
[ERROR]
    testResult ...
[ERROR]
    testScatterGather ...
[ERROR]
ipython1.test.test_controllerservice
  BasicControllerServiceTest
    testDeferreds ...
[ERROR]
    testExecute ...
[ERROR]
    testInterfaces ...
[ERROR]
    testPullNamespace ...
[ERROR]
    testPushPull ...
[ERROR]
    testPushPullSerialized ...
[ERROR]
    testResult ...
[ERROR]
    testScatterGather ...
[ERROR]
                                              [ERROR]
ipython1.test.test_engineservice
  BasicEngineServiceTest
    testCompletedEmptyEngine ...
[ERROR]
    testDeferreds ...
[OK]
    testExecute ...
[OK]
    testGetResult ...
[OK]
    testInterfaces ...
[ERROR]
    testPullNamespace ...
[OK]
    testPushPull ...
[OK]
    testPushPullSerialized ...
[OK]
    testStatus ...
[OK]
                                                     [ERROR]
ipython1.test.test_shell
  BasicShellTest
    testCommand ...
[OK]
    testExecute ...
[OK]
    testPutGet ...
[OK]
    testUpdate ...
[OK]

===============================================================================
[ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testDeferreds

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line
36, in setUp
    self.s = reactor.listenTCP(10111, self.sf)
  File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 386, in listenTCP
    p.startListening()
  File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733,
in startListening
    raise CannotListenError, (self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98,
'Address already in use').
===============================================================================

[ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testExecute

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line
36, in setUp
    self.s = reactor.listenTCP(10111, self.sf)
  File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 386, in listenTCP
    p.startListening()
  File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733,
in startListening
    raise CannotListenError, (self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98,
'Address already in use').
===============================================================================

[ERROR]:
ipython1.test.test_controllerpb.BasicControllerPBTest.testInterfaces

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line
36, in setUp
    self.s = reactor.listenTCP(10111, self.sf)
  File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 386, in listenTCP
    p.startListening()
  File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733,
in startListening
    raise CannotListenError, (self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98,
'Address already in use').
===============================================================================

[ERROR]:
ipython1.test.test_controllerpb.BasicControllerPBTest.testPullNamespace

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line
36, in setUp
    self.s = reactor.listenTCP(10111, self.sf)
  File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 386, in listenTCP
    p.startListening()
  File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733,
in startListening
    raise CannotListenError, (self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98,
'Address already in use').
===============================================================================

[ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testPushPull

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line
36, in setUp
    self.s = reactor.listenTCP(10111, self.sf)
  File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 386, in listenTCP
    p.startListening()
  File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733,
in startListening
    raise CannotListenError, (self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98,
'Address already in use').
===============================================================================

[ERROR]:
ipython1.test.test_controllerpb.BasicControllerPBTest.testPushPullSerialized

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line
36, in setUp
    self.s = reactor.listenTCP(10111, self.sf)
  File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 386, in listenTCP
    p.startListening()
  File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733,
in startListening
    raise CannotListenError, (self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98,
'Address already in use').
===============================================================================

[ERROR]: ipython1.test.test_controllerpb.BasicControllerPBTest.testResult

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line
36, in setUp
    self.s = reactor.listenTCP(10111, self.sf)
  File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 386, in listenTCP
    p.startListening()
  File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733,
in startListening
    raise CannotListenError, (self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98,
'Address already in use').
===============================================================================

[ERROR]:
ipython1.test.test_controllerpb.BasicControllerPBTest.testScatterGather

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerpb.py", line
36, in setUp
    self.s = reactor.listenTCP(10111, self.sf)
  File "/usr/lib/python2.4/site-packages/twisted/internet/posixbase.py",
line 386, in listenTCP
    p.startListening()
  File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 733,
in startListening
    raise CannotListenError, (self.interface, self.port, le)
twisted.internet.error.CannotListenError: Couldn't listen on any:10111: (98,
'Address already in use').
===============================================================================

[ERROR]:
ipython1.test.test_controllerservice.BasicControllerServiceTest.testDeferreds

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py",
line 31, in setUp
    self.addEngine(1)
  File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py",
line 20, in addEngine
    e = es.completeEngine(es.EngineService(InteractiveShell))
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError: 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]:
ipython1.test.test_controllerservice.BasicControllerServiceTest.testExecute

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py",
line 31, in setUp
    self.addEngine(1)
  File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py",
line 20, in addEngine
    e = es.completeEngine(es.EngineService(InteractiveShell))
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError: 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]:
ipython1.test.test_controllerservice.BasicControllerServiceTest.testInterfaces

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py",
line 31, in setUp
    self.addEngine(1)
  File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py",
line 20, in addEngine
    e = es.completeEngine(es.EngineService(InteractiveShell))
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError: 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]:
ipython1.test.test_controllerservice.BasicControllerServiceTest.testPullNamespace

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py",
line 31, in setUp
    self.addEngine(1)
  File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py",
line 20, in addEngine
    e = es.completeEngine(es.EngineService(InteractiveShell))
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError: 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]:
ipython1.test.test_controllerservice.BasicControllerServiceTest.testPushPull

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py",
line 31, in setUp
    self.addEngine(1)
  File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py",
line 20, in addEngine
    e = es.completeEngine(es.EngineService(InteractiveShell))
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError: 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]:
ipython1.test.test_controllerservice.BasicControllerServiceTest.testPushPullSerialized

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py",
line 31, in setUp
    self.addEngine(1)
  File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py",
line 20, in addEngine
    e = es.completeEngine(es.EngineService(InteractiveShell))
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError: 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]:
ipython1.test.test_controllerservice.BasicControllerServiceTest.testResult

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py",
line 31, in setUp
    self.addEngine(1)
  File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py",
line 20, in addEngine
    e = es.completeEngine(es.EngineService(InteractiveShell))
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError: 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]:
ipython1.test.test_controllerservice.BasicControllerServiceTest.testScatterGather

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_controllerservice.py",
line 31, in setUp
    self.addEngine(1)
  File "/usr/lib/python2.4/site-packages/ipython1/test/multienginetest.py",
line 20, in addEngine
    e = es.completeEngine(es.EngineService(InteractiveShell))
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError: 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]: ipython1.test.test_enginepb

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/twisted/trial/runner.py", line 486,
in loadPackage
    module = modinfo.load()
  File "/usr/lib/python2.4/site-packages/twisted/python/modules.py", line
337, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/usr/lib/python2.4/site-packages/twisted/python/modules.py", line
498, in moduleLoader
    return self._moduleLoader(modname)
  File "/usr/lib/python2.4/site-packages/twisted/python/reflect.py", line
357, in namedAny
    topLevelPackage = __import__(trialname)
  File "/usr/lib/python2.4/site-packages/ipython1/test/test_enginepb.py",
line 33, in ?
    from ipython1.test  import completeenginetest as cet
  File
"/usr/lib/python2.4/site-packages/ipython1/test/completeenginetest.py", line
22, in ?
    class CompleteEngineTestCase(DeferredTestCase):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/completeenginetest.py", line
27, in CompleteEngineTestCase
    engine = es.completeEngine(Empty())
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError: 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]:
ipython1.test.test_engineservice.BasicEngineServiceTest.testCompletedEmptyEngine

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_engineservice.py", line
73, in testCompletedEmptyEngine
    c = es.completeEngine(Empty())
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError : 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]:
ipython1.test.test_engineservice.BasicEngineServiceTest.testInterfaces

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_engineservice.py", line
43, in testInterfaces
    q = es.QueuedEngine(self.engine)
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 342, in __init__
    self.registerMethods()
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 345, in registerMethods
    zi.alsoProvides(self, *self.engine.__provides__)
exceptions.AttributeError : 'module' object has no attribute 'alsoProvides'
===============================================================================
[ERROR]: ipython1.test.test_enginevanilla

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/twisted/trial/runner.py", line 486,
in loadPackage
    module = modinfo.load()
  File "/usr/lib/python2.4/site-packages/twisted/python/modules.py", line
337, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/usr/lib/python2.4/site-packages/twisted/python/modules.py", line
498, in moduleLoader
    return self._moduleLoader(modname)
  File "/usr/lib/python2.4/site-packages/twisted/python/reflect.py", line
357, in namedAny
    topLevelPackage = __import__(trialname)
  File
"/usr/lib/python2.4/site-packages/ipython1/test/test_enginevanilla.py", line
36, in ?
    from ipython1.test  import completeenginetest as cet
  File
"/usr/lib/python2.4/site-packages/ipython1/test/completeenginetest.py", line
22, in ?
    class CompleteEngineTestCase(DeferredTestCase):
  File
"/usr/lib/python2.4/site-packages/ipython1/test/completeenginetest.py", line
27, in CompleteEngineTestCase
    engine = es.completeEngine(Empty())
  File "/usr/lib/python2.4/site-packages/ipython1/kernel/engineservice.py",
line 157, in completeEngine
    zi.alsoProvides(engine, IEngineComplete)
exceptions.AttributeError: 'module' object has no attribute 'alsoProvides'
-------------------------------------------------------------------------------
Ran 29 tests in 1.931s

FAILED (errors=20, successes=11)


On 10/30/06, Brian Granger <ellisonbg.net at gmail.com> wrote:
>
> It looks like you are using an older version of zope.interface.  I
> would grab this version and try it.
>
>
> http://www.zope.org/Products/ZopeInterface/3.1.0c1/ZopeInterface-3.1.0c1.tgz
>
> also, I would use a recent (I alway use the svn trunk) version of
> twisted.  Let me know if that helps.
>
> > I am playing with it right now!  I am planning to run it soon on
> multiple
> > machines with multiple CPUs. Will I have to install Ipython1 on every
> node
> > or Will the controller host spawn the processes across the net? In the
> > README you seem to be starting the engines locally on each host....
>
> Yes, you will need to install everything on each host and start the
> engines on each machine.  If you have mpi installed, you can start the
> engines using mpirun and this will handle it.  Let us know how it
> goes.
>
> Brian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20061106/e6383279/attachment-0001.html 


More information about the SciPy-user mailing list