2015-06-19 34 views
1

如何停止已经开始与发动机: ipcluster engines --n=8 --daemonize 停止ipcluster引擎(IPython的并行)

当前正在运行的进程是这样​​的:

/usr/bin/python /usr/local/bin/ipcluster engines --n=8 --daemonize 
/usr/bin/python -m IPython.parallel.engine --profile-dir /home/ubuntu/.ipython/profile_default --cluster-id --log-to-file --log-level=20 

我不想跑killall python

回答

1

从客户端,您可以拨打shutdown

import IPython.parallel as ipp 
rc = ipp.Client() 
# shutdown specific engines 
rc.shutdown([1, 5]) 
# shutdown all engines: 
rc.shutdown() 
# shutdown everything, including the Hub 
rc.shutdown(hub=True) 
+0

反正从'CLI'做到这一点?使用'/ usr/bin/python/usr/local/bin/ipcluster start --n = 7 --delay = 5 --daemonize'启动引擎的同上。我问,因为[StarCluster似乎不正确地停止引擎](https://github.com/jtriley/StarCluster/issues/538)。 –

+0

'ipcluster stop'应该关闭所有的东西。但是没有CLI API可以做任何选择性的事情。 – minrk

+0

(可能需要一点时间,因为控制器未启动的引擎在'ipcluster停止'后下降,因为它需要一些心跳周期才能让他们注意到,但它们会自动关闭。 – minrk