IMP Reference Guide
2.22.0
The Integrative Modeling Platform
|
Manages workers and contexts. More...
Manages workers and contexts.
Definition at line 367 of file parallel/__init__.py.
Public Member Functions | |
def | __init__ |
Constructor. More... | |
def | add_worker |
Add a Worker object. More... | |
def | get_context |
Create and return a new Context in which tasks can be run. More... | |
def IMP.parallel.Manager.__init__ | ( | self, | |
python = None , |
|||
host = None , |
|||
output = 'worker%d.output' |
|||
) |
Constructor.
python | If not None, the command to run to start a Python interpreter that can import the IMP module. Otherwise, the same interpreter that the manager 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. |
host | The hostname that workers use to connect back to the manager. If not specified, the manager 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 workers to reach the manager (typically the name of the machine's internal network address is needed). If only running local workers, 'localhost' can be used to prohibit connections across the network. |
output | A format string used to name worker output files. It is given the numeric worker id, so for example the default value 'worker%d.output' will yield output files called worker0.output, worker1.output, etc. |
Definition at line 388 of file parallel/__init__.py.
def IMP.parallel.Manager.add_worker | ( | self, | |
worker | |||
) |
Add a Worker object.
Definition at line 414 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.
startup | If not None, a callable (Python function or class that implements the __call__ method) that sets up the worker to run tasks. This method is only called once per worker. The return values from this method are passed to the task object when it runs on the worker. |
Definition at line 424 of file parallel/__init__.py.