[IPython-User] ipcluster: aborting functions

Johannes Korn korn@freisingnet...
Fri Dec 21 05:09:07 CST 2012


I´m using the load_balanced_view to execute functions on the ipcluster.

Seems like a simple problem but it´s about the third time that I did an 
extensive websearch plus 2 hours trail & error without success:

Is there any way to abort the execution of a function without having to 
restart the cluster?

Simple example:

def f():
	while 1 > 0:
		a = 0

from IPython.parallel import Client
c = Client()
lv = c.load_balanced_view()

Now this will run forever. Is there any way to abort it?

What I´m actually looking for goes on step further: Is there a way to 
abort all jobs submitted by an ipython session if I quit the session?

Quite often I have two session open using the ipcluster with program1 
and program2. Then I realise that there is a bug in program2. So far the 
only way to stop program2 for me is to stop and restart the cluster 
which will also execution of program1 :(

Kind regards!


P.S.:  Ipython 0.12.1

More information about the IPython-User mailing list