IMP logo
IMP Reference Guide  2.5.0
The Integrative Modeling Platform
IMP.parallel.Manager Class Reference

Manages slaves and contexts. More...

Inherits object.

Detailed Description

Manages slaves and contexts.

Note
This class is only available in Python.

Definition at line 704 of file parallel/__init__.py.

Public Member Functions

def __init__
 Constructor. More...
 
def add_slave
 Add a Slave object. More...
 
def get_context
 Create and return a new Context in which tasks can be run. More...
 

Constructor & Destructor Documentation

def IMP.parallel.Manager.__init__ (   self,
  python = None,
  host = None,
  output = 'slave%d.output' 
)

Constructor.

Parameters
pythonIf not None, the command to run to start a Python interpreter that can import the IMP module. Otherwise, the same interpreter that the master is currently using is used. This is passed to the shell, so a full command line (including multiple words separated by spaces) can be used if necessary.
hostThe hostname that slaves use to connect back to the master. If not specified, the master machine's primary IP address is used. On multi-homed machines, such as compute cluster headnodes, this may need to be changed to allow all slaves to reach the master (typically the name of the machine's internal network address is needed). If only running local slaves, 'localhost' can be used to prohibit connections across the network.
outputA format string used to name slave output files. It is given the numeric slave id, so for example the default value 'slave%d.output' will yield output files called slave0.output, slave1.output, etc.

Definition at line 724 of file parallel/__init__.py.

Member Function Documentation

def IMP.parallel.Manager.add_slave (   self,
  slave 
)

Add a Slave object.

Definition at line 750 of file parallel/__init__.py.

def IMP.parallel.Manager.get_context (   self,
  startup = None 
)

Create and return a new Context in which tasks can be run.

Parameters
startupIf not None, a callable (Python function or class that implements the __call__ method) that sets up the slave to run tasks. This method is only called once per slave. The return values from this method are passed to the task object when it runs on the slave.
Returns
A new Context object.

Definition at line 760 of file parallel/__init__.py.


The documentation for this class was generated from the following file: