[IPython-User] Parallel over ssh and shared NFS directories with 0.13 on linux

Jose Gomez-Dans jgomezdans@gmail....
Fri Aug 10 13:37:29 CDT 2012


Hi,

I am really struggling to get the parallel functionality to work on ipython
0.13. The different systems have a shared home directory, so things should
be easy. I have also applied #2163. I am using EPD, so there are path
issues with the

1. Create the profile

$ ipython profile create --parallel --profile=ssh
[ProfileCreate] Generating default config file:
u'/home/x/.config/ipython/profile_ssh/ipython_config.py'
[ProfileCreate] Generating default config file:
u'/home/x/.config/ipython/profile_ssh/ipython_qtconsole_config.py'
[ProfileCreate] Generating default config file:
u'/home/x/.config/ipython/profile_ssh/ipython_notebook_config.py'
[ProfileCreate] Generating default config file:
u'/home/x/.config/ipython/profile_ssh/ipcontroller_config.py'
[ProfileCreate] Generating default config file:
u'/home/x/.config/ipython/profile_ssh/ipengine_config.py'
[ProfileCreate] Generating default config file:
u'/home/x/.config/ipython/profile_ssh/ipcluster_config.py'
[ProfileCreate] Generating default config file:
u'/home/x/.config/ipython/profile_ssh/iplogger_config.py'

2. Modify ipcluster_config.py to contain

 c.IPClusterEngines.engine_launcher_class = 'SSHEngineSetLauncher'
 c.SSHEngineSetLauncher.engines = {'bergen': 1}
 c.SSHLauncher.to_send = []
 c.SSHLauncher.to_fetch = []
 c.SSHEngineSetLauncher.engine_cmd =
['/opt/epd-7.1-2-rh5-x86_64/bin/python', '-c',
'\"from IPython.parallel.apps.ipengineapp import launch_new_instance;
launch_new_instance()\"']
 c.SSHEngineSetLauncher.remote_profile_dir='/home/x/.ipython/profile_ssh'

(I have followed the instructions here
http://python.6.n6.nabble.com/IPython-User-ipcluster-in-ssh-mode-in-ipython-0-13-td4982493.html
)

3.  ipcluster start --profile=ssh --debug fails (see log at the bottom)

The log suggestst that the problem is the missing profile-dir in the ssh
command:

Starting SSHEngineLauncher: ['ssh', '-tt', u'bergen',
'/opt/epd-7.1-2-rh5-x86_64/bin/python ', '-c ', '"from
IPython.parallel.apps.ipengineapp import launch_new_instance;
launch_new_instance()"', '--profile-dir', u'', '--log-to-file',
'--log-level=20']


Everything just falls apart after that. I don't really know how to go on
about this, so any help would be very helpful!

Thanks!
Jose



################################################################################################################################################################

# stdout from ipcluster start --profile=ssh --debug

2012-08-10 19:33:42,709.709 [IPClusterStart] Config changed:
2012-08-10 19:33:42,709.709 [IPClusterStart] {'Application': {'log_level':
10}, 'BaseIPythonApplication': {'profile': u'ssh'}}
2012-08-10 19:33:42,777.777 [IPClusterStart] Using existing profile dir:
u'/home/x/.config/ipython/profile_ssh'
2012-08-10 19:33:42,778.778 [IPClusterStart] Searching path [u'/home/x',
u'/home/x/.config/ipython/profile_ssh'] for config files
2012-08-10 19:33:42,778.778 [IPClusterStart] Attempting to load config
file: ipython_config.py
2012-08-10 19:33:42,780.780 [IPClusterStart] Loaded config file:
/home/x/.config/ipython/profile_ssh/ipython_config.py
2012-08-10 19:33:42,780.780 [IPClusterStart] Attempting to load config
file: ipcluster_config.py
2012-08-10 19:33:42,783.783 [IPClusterStart] Loaded config file:
/home/x/.config/ipython/profile_ssh/ipcluster_config.py
2012-08-10 19:33:42,784.784 [IPClusterStart] Config changed:
2012-08-10 19:33:42,784.784 [IPClusterStart] {'BaseIPythonApplication':
{'profile': u'ssh'}, 'IPClusterEngines': {'engine_launcher_class':
'SSHEngineSetLauncher'}, 'Application': {'log_level': 10}, 'ProfileDir':
{}, 'SSHLauncher': {'to_fetch': [], 'to_send': []}, 'SSHEngineSetLauncher':
{'remote_profile_dir': '/home/x/.config/ipython/profile_ssh', 'engine_cmd':
['/opt/epd-7.1-2-rh5-x86_64/bin/python ', '-c ', '"from
IPython.parallel.apps.ipengineapp import launch_new_instance;
launch_new_instance()"'], 'engines': {'bergen': 1}}}
2012-08-10 19:33:42.788 [IPClusterStart] Starting ipcluster with
[daemon=False]
2012-08-10 19:33:42.802 [IPClusterStart] Creating pid file:
/home/x/.config/ipython/profile_ssh/pid/ipcluster.pid
2012-08-10 19:33:42.832 [IPClusterStart] Starting Controller with
LocalControllerLauncher
2012-08-10 19:33:42.832 [IPClusterStart] Starting LocalControllerLauncher:
['/opt/epd-7.1-2-rh5-x86_64/bin/python', '-c', 'from
IPython.parallel.apps.ipcontrollerapp import launch_new_instance;
launch_new_instance()', '--profile-dir',
u'/home/x/.config/ipython/profile_ssh', '--cluster-id', u'',
'--log-to-file', '--log-level=20']
2012-08-10 19:33:42.841 [IPClusterStart] Process
'/opt/epd-7.1-2-rh5-x86_64/bin/python' started: 16905
2012-08-10 19:33:43.546 [IPClusterStart] 2012-08-10 19:33:43,545.545
[IPControllerApp] Using existing profile dir:
u'/home/x/.config/ipython/profile_ssh'
2012-08-10 19:33:43.789 [IPClusterStart] Starting 1 Engines with
SSHEngineSetLauncher
2012-08-10 19:33:43.791 [IPClusterStart] Starting SSHEngineLauncher:
['ssh', '-tt', u'bergen', '/opt/epd-7.1-2-rh5-x86_64/bin/python ', '-c ',
'"from IPython.parallel.apps.ipengineapp import launch_new_instance;
launch_new_instance()"', '--profile-dir', u'', '--log-to-file',
'--log-level=20']
2012-08-10 19:33:43.801 [IPClusterStart] Process 'ssh' started: 16920
2012-08-10 19:33:43.801 [IPClusterStart] Process 'engine set' started:
[None]
2012-08-10 19:33:43.892 [IPClusterStart] tcgetattr: Invalid argument
2012-08-10 19:33:43.996 [IPClusterStart] 2012-08-10 19:33:43.996
[scheduler] Scheduler started [leastload]
2012-08-10 19:33:45.133 [IPClusterStart] usage: -c [-h] [--ip
ENGINEFACTORY.IP] [--work-dir IPENGINEAPP.WORK_DIR]
2012-08-10 19:33:45.133 [IPClusterStart]           [--file
IPENGINEAPP.URL_FILE] [--port ENGINEFACTORY.REGPORT]
2012-08-10 19:33:45.133 [IPClusterStart]           [--profile-dir
PROFILEDIR.LOCATION]
2012-08-10 19:33:45.134 [IPClusterStart]           [--log-to-file
[IPENGINEAPP.LOG_TO_FILE]]
2012-08-10 19:33:45.134 [IPClusterStart]           [--sshkey
ENGINEFACTORY.SSHKEY] [--location ENGINEFACTORY.LOCATION]
2012-08-10 19:33:45.134 [IPClusterStart]           [--clean-logs
IPENGINEAPP.CLEAN_LOGS]
2012-08-10 19:33:45.134 [IPClusterStart]           [--profile
IPENGINEAPP.PROFILE]
2012-08-10 19:33:45.134 [IPClusterStart]           [--cluster-id
IPENGINEAPP.CLUSTER_ID] [--mpi MPI.USE]
2012-08-10 19:33:45.134 [IPClusterStart]           [--ssh
ENGINEFACTORY.SSHSERVER] [-c IPENGINEAPP.STARTUP_COMMAND]
2012-08-10 19:33:45.134 [IPClusterStart]           [--ident
SESSION.SESSION] [--ipython-dir IPENGINEAPP.IPYTHON_DIR]
2012-08-10 19:33:45.134 [IPClusterStart]           [--url
ENGINEFACTORY.URL] [--log-level IPENGINEAPP.LOG_LEVEL]
2012-08-10 19:33:45.135 [IPClusterStart]           [-s
IPENGINEAPP.STARTUP_SCRIPT] [--log-url IPENGINEAPP.LOG_URL]
2012-08-10 19:33:45.135 [IPClusterStart]           [--timeout
ENGINEFACTORY.TIMEOUT] [--keyfile SESSION.KEYFILE]
2012-08-10 19:33:45.135 [IPClusterStart]           [--transport
ENGINEFACTORY.TRANSPORT] [--user SESSION.USERNAME]
2012-08-10 19:33:45.135 [IPClusterStart]           [--no-secure] [--secure]
[--quiet] [--init] [--debug]
2012-08-10 19:33:45.135 [IPClusterStart] -c: error: argument --profile-dir:
expected one argument
2012-08-10 19:33:45.162 [IPClusterStart] Connection to bergen closed.
2012-08-10 19:33:45.163 [IPClusterStart] Process 'ssh' stopped: {'pid':
16920, 'exit_code': 2}
2012-08-10 19:33:45.163 [IPClusterStart] Process 'engine set' stopped:
{'bergen/0': {'pid': 16920, 'exit_code': 2}}
2012-08-10 19:33:45.163 [IPClusterStart]
            Engines shutdown early, they probably failed to connect.

            Check the engine log files for output.

            If your controller and engines are not on the same machine, you
probably
            have to instruct the controller to listen on an interface other
than localhost.

            You can set this by adding "--ip='*'" to your
ControllerLauncher.controller_args.

            Be sure to read our security docs before instructing your
controller to listen on
            a public interface.

2012-08-10 19:33:45.164 [IPClusterStart] IPython cluster: stopping
2012-08-10 19:33:45.222 [IPClusterStart] Traceback (most recent call last):
2012-08-10 19:33:45.222 [IPClusterStart]   File "<string>", line 1, in
<module>
2012-08-10 19:33:45.222 [IPClusterStart]   File
"/home/x/.local/lib/python2.7/site-packages/IPython/parallel/apps/ipcontrollerapp.py",
line 487, in launch_new_instance
2012-08-10 19:33:45.222 [IPClusterStart]     app.start()
2012-08-10 19:33:45.222 [IPClusterStart]   File
"/home/x/.local/lib/python2.7/site-packages/IPython/parallel/apps/ipcontrollerapp.py",
line 461, in start
2012-08-10 19:33:45.223 [IPClusterStart]     self.factory.loop.start()
2012-08-10 19:33:45.223 [IPClusterStart]   File
"/opt/epd-7.1-2-rh5-x86_64/lib/python2.7/site-packages/zmq/eventloop/ioloop.py",
line 251, in start
2012-08-10 19:33:45.223 [IPClusterStart]     event_pairs =
self._impl.poll(poll_timeout)
2012-08-10 19:33:45.223 [IPClusterStart]   File "poll.pyx", line 189, in
zmq.core.poll.Poller.poll (zmq/core/poll.c:2120)
2012-08-10 19:33:45.223 [IPClusterStart]   File "poll.pyx", line 101, in
zmq.core.poll._poll (zmq/core/poll.c:1400)
2012-08-10 19:33:45.223 [IPClusterStart] ZMQError: Interrupted system call
2012-08-10 19:33:45.223 [IPClusterStart]
2012-08-10 19:33:45.224 [IPClusterStart] If you suspect this is an IPython
bug, please report it at:
2012-08-10 19:33:45.224 [IPClusterStart]
https://github.com/ipython/ipython/issues
2012-08-10 19:33:45.224 [IPClusterStart] or send an email to the mailing
list at ipython-dev@scipy.org
2012-08-10 19:33:45.224 [IPClusterStart]
2012-08-10 19:33:45.224 [IPClusterStart] You can print a more detailed
traceback right now with "%tb", or use "%debug"
2012-08-10 19:33:45.225 [IPClusterStart] to interactively debug it.
2012-08-10 19:33:45.225 [IPClusterStart]
2012-08-10 19:33:45.225 [IPClusterStart] Extra-detailed tracebacks for
bug-reporting purposes can be enabled via:
2012-08-10 19:33:45.225 [IPClusterStart]
c.Application.verbose_crash=True
2012-08-10 19:33:45.225 [IPClusterStart]
2012-08-10 19:33:45.260 [IPClusterStart] Process
'/opt/epd-7.1-2-rh5-x86_64/bin/python' stopped: {'pid': 16905, 'exit_code':
1}
2012-08-10 19:33:48.164 [IPClusterStart] Removing pid file:
/home/x/.config/ipython/profile_ssh/pid/ipcluster.pid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120810/7d102d64/attachment.html 


More information about the IPython-User mailing list