[Ipython-tickets] [IPython] #160: IPython1 remote controller problems triggered by mlabwrap
IPython
ipython-tickets@scipy....
Wed May 23 01:43:41 CDT 2007
#160: IPython1 remote controller problems triggered by mlabwrap
--------------------+-------------------------------------------------------
Reporter: jitter | Owner: bgranger
Type: defect | Status: new
Priority: normal | Milestone:
Component: saw | Version:
Severity: normal | Keywords:
--------------------+-------------------------------------------------------
Hi!
I'm running the current SVN version of ipython and the "saw" branch of
ipyton1. In "normal operation" (e.g. using scipy) the cluster and the task
farming interface work nicely. (Excellent work, btw. Thanks a lot!) The
problem is that we have lots of legacy code written in Matlab and I'd like
to use mlabwrap on the engines to perform some image processing tasks.
The attached script, when executed either with "python testcase.py" or
with "%run testcase.py" within an ipython shell aborts with a NameError
exception:
{{{
Starting controller:
Starting engines:
Sarting 2 engines on graceland2
Sarting 2 engines on graceland1
Your cluster is up and running.
For interactive use, you can make a Remote Controller with:
import ipython1.kernel.api as kernel
ipc = kernel.RemoteController(('graceland1',10105))
You can then cleanly stop the cluster from IPython using:
ipc.killAll(controller=True)
Traceback (most recent call last):
File "testcase.py", line 31, in ?
testmlabwrap()
File "testcase.py", line 24, in testmlabwrap
remoteController.executeAll("mlabwrap.mlab.help('svd')")
File "/usr/lib64/python2.4/site-
packages/ipython1-0.9alpha2-py2.4.egg/ipython1
/kernel/multienginexmlrpc.py", line 533, in executeAll
return self.execute('all', lines, block)
File "/usr/lib64/python2.4/site-
packages/ipython1-0.9alpha2-py2.4.egg/ipython1
/kernel/multienginexmlrpc.py", line 520, in execute
result = self._executeRemoteMethod(self._server.execute,
self._clientID, loc
alBlock, targets, lines)
File "/usr/lib64/python2.4/site-
packages/ipython1-0.9alpha2-py2.4.egg/ipython1
/kernel/multienginexmlrpc.py", line 390, in _executeRemoteMethod
result = self._unpackageResult(rawResult)
File "/usr/lib64/python2.4/site-
packages/ipython1-0.9alpha2-py2.4.egg/ipython1
/kernel/multienginexmlrpc.py", line 399, in _unpackageResult
return self._returnOrRaise(result)
File "/usr/lib64/python2.4/site-
packages/ipython1-0.9alpha2-py2.4.egg/ipython1
/kernel/multienginexmlrpc.py", line 403, in _returnOrRaise
result.raiseException()
File "/usr/lib64/python2.4/site-packages/twisted/python/failure.py",
line 259,
in raiseException
raise self.type, self.value, self.tb
NameError
}}}
What's really surprising is that the same sequence of instructions, when
invoked line by line on an ipython shell work nicely (i.e. I don't get an
error but the output of the help('svn') command).
I guess that this either is caused by some race condition or by a timeout
which is exceeded due to a blocking call to the Matlab engine.
Note that I didn't add "clusterfile.py", but this only says to start two
engines on graceland1 and graceland2, respectively.
- jitter
--
Ticket URL: <http://projects.scipy.org/ipython/ipython/ticket/160>
IPython <http://ipython.scipy.org>
The IPython interactive Python system
More information about the Ipython-tickets
mailing list