1 """@namespace IMP.parallel.master_communicator
2 Classes for communicating from the master to slaves."""
10 """For communicating from the master to slaves."""
14 def __init__(self, master_addr, lock):
15 _Communicator.__init__(self)
16 self._master_addr = master_addr
17 self._connect_to_master()
20 def _connect_to_master(self):
21 host, port, identifier = self._master_addr
22 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
23 s.settimeout(self.connect_timeout)
24 s.connect((host, port))
25 s.sendall(identifier.encode(
'ascii'))
33 _Communicator._send(self, obj)
For communicating from the master to slaves.
Distribute IMP tasks to multiple processors or machines.