Ipcluster is easy to start but not trivial to stop from a script, after having finished the processing, here's the solution:
 from IPython.kernel import client mec = client.MultiEngineClient() mec.kill(controller=True)