Stopping ipcluster engines (IPython Parallel)

2.6k views Asked by At

How do I stop the engines that have been started with: ipcluster engines --n=8 --daemonize

The currently running processes look like:

/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

I do not want to run killall python.

1

There are 1 answers

4
minrk On

From a Client, you can call 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)