neurokernel.mpi.WorkerManager

class neurokernel.mpi.WorkerManager(ctrl_tag=1)[source]

Self-launching MPI worker manager.

This class may be used to construct an MPI application consisting of

  • a manager process that spawns MPI processes that execute the run() methods of several subclasses of the Worker class;
  • worker processes that perform some processing task; and

The application should NOT be started via mpiexec.

Parameters:ctrl_tag (int) – MPI tag to identify control messages transmitted to worker nodes. May not be equal to mpi4py.MPI.ANY_TAG

Notes

This class requires MPI-2 dynamic processing management.

See also

Worker

__init__(ctrl_tag=1)[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
add(target, *args, **kwargs) Add a worker to an MPI application.
process_worker_msg(msg) Process the specified deserialized message from a worker.
quit() Tell the workers to quit.
recv([tag]) Receive data from child process.
send(data, dest[, tag]) Send data to child process.
spawn() Spawn MPI processes for and execute each of the managed targets.
start([steps]) Tell the workers to start processing data.
stop() Tell the workers to stop processing data.
wait() Wait for execution to complete.

Attributes

intercomm Intercommunicator to spawned processes.
log_on Logger switch.