quimb.linalg.mpi_launcher#
Manages the spawning of mpi processes to send to the various solvers.
Functions
|
Broadcast a result to all workers, dispatching to proper MPI (rather than pickled) communication if the result is a numpy array. |
Function to determine whether we are allowed to call get_mpi_pool. |
Classes
|
Decorator for caching the mpi pool when called with the equivalent args, and shutting down previous ones when not needed. |
|
Wrap a function to automatically get the correct communicator before its called, and to set the comm_self kwarg to allow forced self mode. |
Automatically wrap a function to be executed in parallel by a pool of mpi workers. |
|
An object that looks like a |
|
|
- class quimb.linalg.mpi_launcher.CachedPoolWithShutdown(pool_fn)[source]#
Decorator for caching the mpi pool when called with the equivalent args, and shutting down previous ones when not needed.
- class quimb.linalg.mpi_launcher.GetMPIBeforeCall(fn)[source]#
Wrap a function to automatically get the correct communicator before its called, and to set the comm_self kwarg to allow forced self mode.
This is called by every mpi process before the function evaluation.
- class quimb.linalg.mpi_launcher.SpawnMPIProcessesFunc(fn)[source]#
Automatically wrap a function to be executed in parallel by a pool of mpi workers.
This is only called by the master mpi process in manual mode, only by the (non-mpi) spawning process in automatic mode, or by all processes in syncro mode.
- class quimb.linalg.mpi_launcher.SynchroMPIPool[source]#
An object that looks like a
concurrent.futures
executor but actually distributes tasks in a round-robin fashion based to MPI workers, before broadcasting the results to each other.