##// END OF EJS Templates
Backport PR #2126: ipcluster broken with any batch (PBS/LSF/SGE)...
Backport PR #2126: ipcluster broken with any batch (PBS/LSF/SGE) I have setup ipcluster_config.py to start with LSF: ``` c.IPClusterStart.controller_launcher_class = 'LSF' c.IPClusterStart.engine_launcher_class = 'LSF' ``` But the ipcluster command fails to start the engines: ``` ipcluster start --profile=lsf -n 10 ``` The problem is fixed if I add quotes to the launch command string ```cmd``` in ```launcher.py```. ``` diff --git a/IPython/parallel/apps/launcher.py b/IPython/parallel/apps/launcher.py index e752d2a..6035303 100644 --- a/IPython/parallel/apps/launcher.py +++ b/IPython/parallel/apps/launcher.py @@ -73,7 +73,7 @@ WINDOWS = os.name == 'nt' # Paths to the kernel apps #----------------------------------------------------------------------------- -cmd = "from IPython.parallel.apps.%s import launch_new_instance; launch_new_instance()" +cmd = "\"from IPython.parallel.apps.%s import launch_new_instance; launch_new_instance()\"" ipcluster_cmd_argv = [sys.executable, "-c", cmd % "ipclusterapp"] ```

File last commit:

r7483:5887d587
r7995:061632b4
Show More
__init__.py
75 lines | 2.2 KiB | text/x-python | PythonLexer
MinRK
update recently changed modules with Authors in docstring
r4018 """The IPython ZMQ-based parallel computing interface.
Authors:
* MinRK
"""
MinRK
cleanup pass
r3644 #-----------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
MinRK
depend on pyzmq-2.1dev on Windows...
r3779 import os
MinRK
warn on detection of libzmq 3
r4248 import warnings
MinRK
pyzmq-2.1.3 related testing adjustments
r3661 import zmq
MinRK
bind_kernel on a bound kernel is a no-op
r7312 from IPython.config.configurable import MultipleInstanceError
MinRK
use ROUTER/DEALER socket names instead of XREP/XREQ...
r4725 from IPython.zmq import check_for_zmq
MinRK
depend on pyzmq-2.1dev on Windows...
r3779
if os.name == 'nt':
MinRK
use ROUTER/DEALER socket names instead of XREP/XREQ...
r4725 min_pyzmq = '2.1.7'
else:
min_pyzmq = '2.1.4'
MinRK
warn on detection of libzmq 3
r4248
MinRK
use ROUTER/DEALER socket names instead of XREP/XREQ...
r4725 check_for_zmq(min_pyzmq, 'IPython.parallel')
MinRK
warn on detection of libzmq 3
r4248
MinRK
move IPython.zmq.parallel to IPython.parallel
r3666 from IPython.utils.pickleutil import Reference
MinRK
add DirectView.importer contextmanager, demote targets to mutable flag...
r3665
MinRK
organize IPython.parallel into subpackages
r3673 from .client.asyncresult import *
from .client.client import Client
from .client.remotefunction import *
from .client.view import *
from .controller.dependency import *
MinRK
include errors in IPython.parallel namespace
r7483 from .error import *
from .util import interactive
MinRK
organize IPython.parallel into subpackages
r3673
MinRK
add IPython.parallel.bind_kernel...
r6893 #-----------------------------------------------------------------------------
# Functions
#-----------------------------------------------------------------------------
def bind_kernel(**kwargs):
"""Bind an Engine's Kernel to be used as a full IPython kernel.
This allows a running Engine to be used simultaneously as a full IPython kernel
with the QtConsole or other frontends.
This function returns immediately.
"""
MinRK
bind_kernel on a bound kernel is a no-op
r7312 from IPython.zmq.ipkernel import IPKernelApp
MinRK
add IPython.parallel.bind_kernel...
r6893 from IPython.parallel.apps.ipengineapp import IPEngineApp
MinRK
bind_kernel on a bound kernel is a no-op
r7312
# first check for IPKernelApp, in which case this should be a no-op
# because there is already a bound kernel
if IPKernelApp.initialized() and isinstance(IPKernelApp._instance, IPKernelApp):
return
MinRK
add IPython.parallel.bind_kernel...
r6893 if IPEngineApp.initialized():
MinRK
bind_kernel on a bound kernel is a no-op
r7312 try:
app = IPEngineApp.instance()
except MultipleInstanceError:
pass
else:
return app.bind_kernel(**kwargs)
raise RuntimeError("bind_kernel be called from an IPEngineApp instance")
MinRK
add IPython.parallel.bind_kernel...
r6893
MinRK
add DirectView.importer contextmanager, demote targets to mutable flag...
r3665