Communicator

template<class ...attr_val_type>
comm_attr create_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_attr create_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, class ContextType>
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 ranks

  • rank: user-supplied rank

  • device: local device

  • devices: user-supplied mapping of local ranks on devices

  • context: context containing the devices

  • kvs: key-value store for ranks wire-up

  • attr: optional communicator attributes

template<class DeviceType, class ContextType>
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 ranks

  • devices: user-supplied device objects for local ranks

  • context: context containing the devices

  • kvs: key-value store for ranks wire-up

  • attr: 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