New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipcluster broken with any batch launcher (PBS/LSF/SGE) #2126
Conversation
Unfortunately this fix will break the other launchers which call processes directly (instead of writing a batch script). Instead can you look at changing the I think something like replacing |
You may want to look into |
That makes sense. I moved the change into the Launcher classes as you suggested. The following fix works for LSF. Happy to send a pull request. |
Yes, please make a pull request. If this fix seems appropriate elsewhere Lastly, two small styles changes:
Thanks! |
…d not launch engines or controller.
This looks good to me now, thanks @bfroehle for the review! Anything else before merge? Side question: does anyone know how this Issue magically turned itself into a pull request? |
The one way I know how to turn issues into pull requests is with defunkt/hub. |
This looks good to me as well. Thanks @guyhf. |
Thanks, I'll go ahead and merge, then. I've been using hub for ages, but I didn't know you could do that. Neat! |
use pipes.quote when writing ipfoo_cmd to batch files fixes ipcluster with any batch system when there are spaces in these commands.
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"] ```
* commit 'rel-0.13-33-gcfc5692': (33 commits) Backport PR ipython#2347: adjust division error message checking to account for Python 3 Backport PR ipython#2305: RemoteError._render_traceback_ calls self.render_traceback Backport PR ipython#2280: fix SSH passwordless check for OpenSSH Backport PR ipython#2270: SSHLauncher tweaks Backport PR ipython#2261: Fix: longest_substr([]) -> '' Backport PR ipython#2250: fix html in notebook example Backport PR ipython#2235: remove spurious print statement from setupbase.py fixup Backport PR ipython#2223: Custom tracebacks Backport PR ipython#2214: use KernelApp.exec_lines/files in IPEngineApp Backport PR ipython#2212: catch errors in markdown javascript Backport PR ipython#2194: clean nan/inf in json_clean Backport PR ipython#2177: remove numpy install from travis/tox scripts Backport PR ipython#2169: ipdb: pdef, pdoc, pinfo magics all broken Backport PR ipython#2186: removed references to h5py dependence in octave magic documentation Backport PR ipython#2185: added test for %store, fixed storemagic Backport PR ipython#2170: Fix tab completion with IPython.embed_kernel(). Backport PR ipython#2163: fix 'remote_profie_dir' typo in SSH launchers Backport PR ipython#2117: use explicit url in notebook example Backport PR ipython#2126: ipcluster broken with any batch (PBS/LSF/SGE) ...
use pipes.quote when writing ipfoo_cmd to batch files fixes ipcluster with any batch system when there are spaces in these commands.
I have setup ipcluster_config.py to start with LSF:
But the ipcluster command fails to start the engines:
The problem is fixed if I add quotes to the launch command string
cmd
inlauncher.py
.