next up previous contents index
Next: Communicator.send_data() send Up: Parallel job support Previous: job.run_all_tasks() run   Contents   Index

job.start() -- start all slaves for message-passing

This starts all non-running slaves in the job, such that they can later be used for message passing. (There is no need to call this command if using the task interface, as the slaves are automatically started when required.)
Example: examples/python/

from modeller import *
from modeller.parallel import *

# Create an empty parallel job, and then add a single slave process running
# on the local machine
j = job()

# Start all slave processes (note: this will only work if 'modxxx' - where
# xxx is the Modeller version - is in the PATH; if not, use modeller_path
# to specify an alternate location)

# Have each slave read in a PDB file (provided by us, the master) and
# return the PDB resolution back to us
for slave in j:
env = environ() = ["../atom_files"]
code = master.get_data()
mdl = model(env, file=code)
    data = slave.get_data()
    print slave, "returned model resolution: ", data

Ben Webb 2008-05-05