ptypy.utils.parallel.gather_dict#
- ptypy.utils.parallel.gather_dict(dct, target=0)#
Gathers broadcasted or scattered dict dct at rank target.
- Parameters:
dct (dict) – Input dictionary. Remains unaltered
target (int) – Rank of process where the dct’s are gathered
- Returns:
out – Gathered dict at
rank==target, Empty dict atrank!=target- Return type:
dict
Note
If the same key exists on different nodes, the corresponding values will be consecutively overidden in the order of the ranks at the gathering node without complain or notification.
See also