Communicator¶
-
template<class ...
attr_val_type
>
comm_attrcreate_comm_attr
(attr_val_type&&... avs) Creates an attribute object, which may used to control create communicator operation.
- Return
an attribute object
-
template<class ...
attr_val_type
>
comm_split_attrcreate_comm_split_attr
(attr_val_type&&... avs) Creates an attribute object, which may used to control split communicator operation.
- Return
an attribute object
-
template<class
DeviceType
, classContextType
>
vector_class<communicator>create_communicators
(int size, const vector_class<pair_class<int, DeviceType>> &devices, const ContextType &context, shared_ptr_class<kvs_interface> kvs, const comm_attr &attr = default_comm_attr) Creates new communicators with user supplied size, ranks, local device-rank mapping and kvs.
- Return
vector of communicators / communicator
- Parameters
size
: user-supplied total number of ranksrank
: user-supplied rankdevice
: local devicedevices
: user-supplied mapping of local ranks on devicescontext
: context containing the deviceskvs
: key-value store for ranks wire-upattr
: optional communicator attributes
-
template<class
DeviceType
, classContextType
>
vector_class<communicator>create_communicators
(int size, const vector_class<DeviceType> &devices, const ContextType &context, shared_ptr_class<kvs_interface> kvs, const comm_attr &attr = default_comm_attr) Creates a new communicators with user supplied size, local devices and kvs. Ranks will be assigned automatically.
- Return
vector of communicators / communicator
- Parameters
size
: user-supplied total number of ranksdevices
: user-supplied device objects for local rankscontext
: context containing the deviceskvs
: key-value store for ranks wire-upattr
: optional communicator attributes
-
communicator
create_communicator
(const comm_attr &attr = default_comm_attr) Creates a new communicator with externally provided size, rank and kvs. Implementation is platform specific and non portable.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Return
communicator
- Parameters
attr
: optional communicator attributes
-
vector_class<communicator>
split_communicators
(const vector_class<pair_class<communicator, comm_split_attr>> &attrs) Splits communicators according to attributes.
- Return
vector of communicators
- Parameters
attrs
: split attributes for local communicators