kernel.scripts.ipcluster

Module: kernel.scripts.ipcluster

Inheritance diagram for IPython.kernel.scripts.ipcluster:

Start an IPython cluster = (controller + engines).

Classes

BatchEngineSet

class IPython.kernel.scripts.ipcluster.BatchEngineSet(template_file, **kwargs)

Bases: object

__init__(template_file, **kwargs)
handle_error(f)
kill()
parse_job_id(output)
start(n)
write_batch_script(n)

ControllerLauncher

class IPython.kernel.scripts.ipcluster.ControllerLauncher(extra_args=None)

Bases: IPython.kernel.scripts.ipcluster.ProcessLauncher

__init__(extra_args=None)

EngineLauncher

class IPython.kernel.scripts.ipcluster.EngineLauncher(extra_args=None)

Bases: IPython.kernel.scripts.ipcluster.ProcessLauncher

__init__(extra_args=None)

LauncherProcessProtocol

class IPython.kernel.scripts.ipcluster.LauncherProcessProtocol(process_launcher)

Bases: twisted.internet.protocol.ProcessProtocol

A ProcessProtocol to go with the ProcessLauncher.

__init__(process_launcher)
connectionMade()
errReceived(data)
outReceived(data)
processEnded(status)

LocalEngineSet

class IPython.kernel.scripts.ipcluster.LocalEngineSet(extra_args=None)

Bases: object

__init__(extra_args=None)
interrupt_then_kill(delay=1.0)
signal(sig)
start(n)

PBSEngineSet

class IPython.kernel.scripts.ipcluster.PBSEngineSet(template_file, **kwargs)

Bases: IPython.kernel.scripts.ipcluster.BatchEngineSet

__init__(template_file, **kwargs)

ProcessLauncher

class IPython.kernel.scripts.ipcluster.ProcessLauncher(cmd_and_args)

Bases: object

Start and stop an external process in an asynchronous manner.

Currently this uses deferreds to notify other parties of process state changes. This is an awkward design and should be moved to using a formal NotificationCenter.

__init__(cmd_and_args)
fire_start_deferred(pid)
fire_stop_deferred(exit_code)
get_stop_deferred()
interrupt_then_kill(delay=1.0)
running
signal(sig)

Send a signal to the process.

The argument sig can be (‘KILL’,’INT’, etc.) or any signal number.

start()

ProcessStateError

class IPython.kernel.scripts.ipcluster.ProcessStateError

Bases: exceptions.Exception

__init__()
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

SSHEngineSet

class IPython.kernel.scripts.ipcluster.SSHEngineSet(engine_hosts, sshx=None, ipengine='ipengine')

Bases: object

__init__(engine_hosts, sshx=None, ipengine='ipengine')

Start a controller on localhost and engines using ssh.

The engine_hosts argument is a dict with hostnames as keys and the number of engine (int) as values. sshx is the name of a local file that will be used to run remote commands. This file is used to setup the environment properly.

kill()
start(send_furl=False)

UnknownStatus

class IPython.kernel.scripts.ipcluster.UnknownStatus

Bases: exceptions.Exception

__init__()
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Functions

IPython.kernel.scripts.ipcluster.check_reuse(args, cont_args)
Check to see if we should try to resuse FURL files.
IPython.kernel.scripts.ipcluster.check_security(args, cont_args)
Check to see if we should run with SSL support.
IPython.kernel.scripts.ipcluster.get_args()
IPython.kernel.scripts.ipcluster.main()
IPython.kernel.scripts.ipcluster.main_local(args)
IPython.kernel.scripts.ipcluster.main_mpi(args)
IPython.kernel.scripts.ipcluster.main_pbs(args)
IPython.kernel.scripts.ipcluster.main_ssh(args)

Start a controller on localhost and engines using ssh.

Your clusterfile should look like:

send_furl = False # True, if you want 
engines = {
    'engine_host1' : engine_count, 
    'engine_host2' : engine_count2
}