##// 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:

r6455:15863dc1
r7995:061632b4
Show More
multiengine2.py
29 lines | 794 B | text/x-python | PythonLexer
MinRK
translate last remaining old parallel examples
r3690 #-------------------------------------------------------------------------------
# Imports
#-------------------------------------------------------------------------------
Thomas Kluyver
Update print syntax in parallel examples.
r6455 from __future__ import print_function
MinRK
translate last remaining old parallel examples
r3690
import time
from IPython.parallel import Client
#-------------------------------------------------------------------------------
# Setup
#-------------------------------------------------------------------------------
mux = Client()[:]
mux.clear()
mux.block=False
ar1 = mux.apply(time.sleep, 5)
ar2 = mux.push(dict(a=10,b=30,c=range(20000),d='The dog went swimming.'))
ar3 = mux.pull(('a','b','d'), block=False)
Thomas Kluyver
Update print syntax in parallel examples.
r6455 print("Try a non-blocking get_result")
MinRK
translate last remaining old parallel examples
r3690 ar4 = mux.get_result()
Thomas Kluyver
Update print syntax in parallel examples.
r6455 print("Now wait for all the results")
MinRK
translate last remaining old parallel examples
r3690 mux.wait([ar1,ar2,ar3,ar4])
Thomas Kluyver
Update print syntax in parallel examples.
r6455 print("The last pull got:", ar4.r)