elephant.parallel.MPICommExecutor¶
- class elephant.parallel.MPICommExecutor(comm=None, root=0)[source]¶
Legacy MPI-1 implementation for cluster nodes which do not support MPI-2 protocol.
- Parameters:
- commMPI.Intracomm or None
MPI (intra)communicator. If None, set to MPI.COMM_WORLD. Default: None
- rootint
Designated master process. Default: 0
Notes
-m mpi4py.futures command line option is needed to execute Python scripts with MPI:
mpiexec -n numprocs python -m mpi4py.futures pyfile [arg] ...
For more information of how to launch MPI processes in Python refer to https://mpi4py.readthedocs.io/en/stable/mpi4py.futures.html#command-line
Methods
__init__
([comm, root])execute
(handler, args_iterate, **kwargs)Executes the queue of [handler(arg, **kwargs) for arg in args_iterate] in multiple processes within one machine (ProcessPoolExecutor) or multiple nodes (MPIPoolExecutor and MPICommExecutor).