neurokernel.mpi.Worker¶
-
class
neurokernel.mpi.
Worker
(ctrl_tag=1, *args, **kwargs)[source]¶ MPI worker class.
This class repeatedly executes a work method.
Parameters: ctrl_tag (int) – MPI tag to identify control messages transmitted to worker nodes. -
__init__
(ctrl_tag=1, *args, **kwargs)[source]¶ x.__init__(…) initializes x; see help(type(x)) for signature
Methods
__init__
([ctrl_tag])x.__init__(…) initializes x; see help(type(x)) for signature do_work
()Work method. post_run
()Code to run after main loop. pre_run
()Code to run before main loop. recv_parent
([tag])Receive data from parent process. recv_peer
([source, tag])run
()Main body of worker process. send_parent
(data[, tag])Send data to parent process. send_peer
(data, dest[, tag])Send data to peer process. Attributes
intercomm
Intercommunicator to access parent process. intracomm
Intracommunicator to access peer processes. log_on
Logger switch. max_steps
Maximum number of steps to execute. rank
MPI process rank. size
Number of peer processes. -