4.7.10 pde.tools.mpi module
Auxiliary functions and variables for dealing with MPI multiprocessing.
Warning
These functions are mostly no-ops unless MPI is properly installed and python code
was started using mpirun or mpiexec. Please refer to the
documentation of your MPI distribution for details.
Send data to another MPI node. |
|
Receive data from another MPI node. |
|
Combines data from all MPI nodes. |
- is_main: bool = True
Flag indicating whether the current process is the main process (with ID 0)
- Type:
- mpi_allreduce(data, operator)[source]
Combines data from all MPI nodes.
Note that complex datatypes and user-defined reduction operators are not properly supported in numba-compiled cases.
- mpi_bcast(data, root=0)[source]
Broadcast data from root node to all other MPI nodes.
- Parameters:
data (T) – The data being sent
root (int) – The ID of the sending node
- Return type:
T