tkwant.mpi.distribute_dict¶
-
tkwant.mpi.
distribute_dict
(input_dict, distribute_keys, comm)[source]¶ Distribute a dict over all MPI ranks.
- input_dictdict
A dictionary that is identical on each MPI rank.
- distribute_keyscallable
Boolean function with signature (key, comm) that maps each key from
input_dict
exactly to one MPI rank.- comm
mpi4py.MPI.Intracomm
The MPI communicator.
- Returns
distributed_dict – A dict which distributed over all MPI ranks.
- Return type