Communicators#

A communicator consists of a group of processed and defines a communication context that partitions the communication space. A message sent in one context cannot be received in another context. Furthermore, where permitted, collective operations are independent of pending point-to-point operations.

MPL defines several kinds of communicators:

  • standard communicators,

  • communicators with a process topology (Cartesian communicators, graph communicators, distributed graph communicators) and

  • inter-communicators.

An inter-communicator identifies two distinct groups of processes linked with a communication context.

Standard communicators#

class communicator : public base_communicator#

Specifies the communication context for a communication operation.

Subclassed by topology_communicator

Public Types

enum class merge_order_type#

Specifies the process order when merging the local and the remote groups of an inter-communicator into a communicator.

Values:

enumerator order_low#

when merging the local and the remote groups of an inter-communicator put processes of this group before processes that belong to the other group

enumerator order_high#

when merging the local and the remote groups of an inter-communicator put processes of this group after processes that belong to the other group

enum class equality_type#

Equality types for communicator comparison.

Values:

enumerator identical#

communicators are identical, i.e., communicators represent the same communication context

enumerator congruent#

communicators are identical, i.e., communicators have the same members in same rank order but a different context

enumerator similar#

communicators are similar, i.e., communicators have same the members in different rank order

enumerator unequal#

communicators are unequal, i.e., communicators have different sets of members

Public Functions

communicator() = default#

Creates an empty communicator with no associated process.

inline communicator(const communicator &other)#

Creates a new communicator which is equivalent to an existing one.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other. Communicators should not be copied unless a new independent communicator is wanted. Communicators should be passed via references to functions to avoid unnecessary copying.

Parameters:

other – the other communicator to copy from

inline communicator(communicator &&other) noexcept#

Move-constructs a communicator.

Parameters:

other – the other communicator to move from

inline explicit communicator(const inter_communicator &other, merge_order_type order)#

Creates a new communicator by merging the local and the remote groups of an inter-communicator.

Note

This is a collective operation that needs to be carried out by all processes of the local and the remote groups of the inter-communicator other. The order parameter must be the same for all process within in the local group as well as within the remote group. It should differ for both groups.

Parameters:
  • other – the inter-communicator to merge

  • order – affects the process ordering in the new communicator

inline explicit communicator(comm_collective_tag comm_collective, const communicator &other, const group &gr)#

Constructs a new communicator from an existing one with a specified communication group.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other.

Parameters:
  • comm_collective – tag to indicate the mode of construction

  • other – the communicator

  • gr – the group that determines the new communicator’s structure

inline explicit communicator(group_collective_tag group_collective, const communicator &other, const group &gr, tag_t t = tag_t{0})#

Constructs a new communicator from an existing one with a specified communication group.

Note

This is a collective operation that needs to be carried out by all processes of the given group.

Parameters:
  • group_collective – tag to indicate the mode of construction

  • other – the communicator

  • gr – the group that determines the new communicator’s structure

  • t – tag to distinguish between different parallel operations in different threads

template<typename color_type, typename key_type = int>
inline explicit communicator(split_tag split, const communicator &other, color_type color, key_type key = 0)#

Constructs a new communicator from an existing one with a specified communication group.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other.

Template Parameters:
  • color_type – color type, must be integral type

  • key_type – key type, must be integral type

Parameters:
  • split – tag to indicate the mode of construction

  • other – the communicator

  • color – control of subset assignment

  • key – control of rank assignment

template<typename key_type = int>
inline explicit communicator(split_shared_memory_tag split_shared_memory, const communicator &other, key_type key = 0)#

Constructs a new communicator from an existing one by spitting the communicator into disjoint subgroups each of which can create a shared memory region.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other.

Template Parameters:

color_type – color type, must be integral type

Parameters:
  • split_shared_memory – tag to indicate the mode of construction

  • other – the communicator

  • key – control of rank assignment

inline communicator &operator=(const communicator &other) noexcept#

Copy-assigns and creates a new communicator which is equivalent to an existing one.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other. Communicators should not be copied unless a new independent communicator is wanted. Communicators should be passed via references to functions to avoid unnecessary copying.

Parameters:

other – the other communicator to copy from

Returns:

this communicator

inline communicator &operator=(communicator &&other) noexcept#

Move-assigns a communicator.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other.

Parameters:

other – the other communicator to move from

Returns:

this communicator

inline int size() const#

Determines the total number of processes in a communicator.

Returns:

number of processes

inline int rank() const#

Determines the rank within a communicator.

Returns:

the rank of the calling process in the communicator

inline void info(const mpl::info &i) const#

Updates the hints of the communicator.

Parameters:

i – info object with new hints

inline mpl::info info() const#

Get the the hints of the communicator.

Returns:

hints of the communicator

inline bool operator==(const communicator &other) const#

Tests for identity of communicators.

Parameters:

other – communicator to compare with

Returns:

true if identical

inline bool operator!=(const communicator &other) const#

Tests for identity of communicators.

Parameters:

other – communicator to compare with

Returns:

true if not identical

inline equality_type compare(const communicator &other) const#

Compares to another communicator.

Parameters:

other – communicator to compare with

Returns:

equality type

template<typename T>
inline void alltoall(T *sendrecv_data) const#

Sends messages to all processes and receives messages from all processes, in-place version.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array sendrecv_data is sent to the i-th process. When the function has finished, the i-th element in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:

sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

template<typename T>
inline void alltoall(T *sendrecv_data, const layout<T> &sendrecvl) const#

Sends messages to all processes and receives messages from all processes, in-place version.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendrecvl. The i-th memory block with the layout sendrecvl in the array sendrecv_data is sent to the i-th process. When the function has finished, the i-th memory block with the layout sendrecvl in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

  • sendrecvl – memory layouts of the data to send and to receive

template<typename T>
inline irequest ialltoall(T *sendrecv_data) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner, in-place version.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array sendrecv_data is sent to the i-th process. When the message transfer has finished, the i-th element in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:

sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(T *sendrecv_data, const layout<T> &sendrecvl) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner, in-place version.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendrecvl. The i-th memory block with the layout sendrecvl in the array sendrecv_data is sent to the i-th process. When the message transfer has finished, the i-th memory block with the layout sendrecvl in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

  • sendrecvl – memory layouts of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void alltoallv(T *sendrecv_data, const layouts<T> &sendrecvls, const displacements &sendrecvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendecvdata. The i-th memory block with the layout sendlrecvs[i] in the array sendrecv_data starts sendrecvdispls[i] bytes after the address given in sendrecv_data. The i-th memory block is sent to the i-th process. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing and incoming messages

  • sendrecvls – memory layouts of the data to send and to receive

  • sendrecvdispls – displacements of the data to send and to receive

template<typename T>
inline void alltoallv(T *sendrecv_data, const layouts<T> &sendrecvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendrecv_data. The i-th memory block with the layout sendrecvls[i] in the array sendrecv_data starts at the address given in sendrecv_data. The i-th memory block is sent to the i-th process. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send-receive blocks. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for incoming and outgoing messages

  • sendrecvls – memory layouts of the data to send and to receive

template<typename T>
inline irequest ialltoallv(T *sendrecv_data, const layouts<T> &sendrecvls, const displacements &sendrecvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendecvdata. The i-th memory block with the layout sendlrecvs[i] in the array sendrecv_data starts sendrecvdispls[i] bytes after the address given in sendrecv_data. The i-th memory block is sent to the i-th process. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing and incoming messages

  • sendrecvls – memory layouts of the data to send and to receive

  • sendrecvdispls – displacements of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(T *sendrecv_data, const layouts<T> &sendrecvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendrecv_data. The i-th memory block with the layout sendrecvls[i] in the array sendrecv_data starts at the address given in sendrecv_data. The i-th memory block is sent to the i-th process. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send-receive blocks. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the

Parameters:
  • sendrecv_data – pointer to continuous storage for incoming and outgoing messages

  • sendrecvls – memory layouts of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T, typename F>
inline void reduce(F f, int root_rank, T &sendrecv_data) const#

Performs a reduction operation over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input data for the reduction operation, will hold the result of the reduction operation if rank equals root_rank

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T &send_data) const#

Performs a reduction operation over all processes, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input data for the reduction operation

template<typename T, typename F>
inline void reduce(F f, int root_rank, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input buffer for the reduction operation, will hold the results of the reduction operation if rank equals root_rank

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T *send_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, T &sendrecv_data) const#

Performs a reduction operation over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input data for the reduction operation, will hold the result of the reduction operation if rank equals root_rank

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T &send_data) const#

Performs a reduction operation over all processes in a non-blocking manner, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input buffer for the reduction operation, will hold the results of the reduction operation if rank equals root_rank

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T *send_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in a non-blocking manner, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void allreduce(F f, T &sendrecv_data) const#

Performs a reduction operation over all processes and broadcasts the result, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void allreduce(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iallreduce(F f, T &sendrecv_data) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result in non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void scan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void scan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction (scan) operation over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void exscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void exscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iexscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

inline inter_communicator spawn(int root_rank, int max_procs, const command_line &command) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • max_procs – number of processes to span

  • command – command and command-line options to the processes that are spawned

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn(int root_rank, int max_procs, const command_line &command, const mpl::info &i) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • max_procs – number of processes to span

  • command – command and command-line options to the processes that are spawned

  • i – info object telling the underlying MPI runtime how to spawn the new processes

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn(int root_rank) const#

Spawns new processes and establishes communication, non-root variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:

root_rank – the root process

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank, const command_lines &commands) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • commands – command and command-line options to the processes that are spawned

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank, const command_lines &commands, const mpl::infos &i) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • commands – command and command-line options to the processes that are spawned

  • i – list of info object telling the underlying MPI runtime how to spawn the new processes

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank) const#

Spawns new processes and establishes communication, non-root variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:

root_rank – the root process

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

template<typename T>
inline void alltoall(const T *send_data, T *recv_data) const#

Sends messages to all processes and receives messages from all processes.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array send_data is sent to the i-th process. When the function has finished, the i-th element in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • recv_data – pointer to continuous storage for incoming messages

template<typename T>
inline void alltoall(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Sends messages to all processes and receives messages from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array send_data is sent to the i-th process. When the function has finished, the i-th memory block with the layout recvl in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

template<typename T>
inline irequest ialltoall(const T *send_data, T *recv_data) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array send_data is sent to the i-th process. When the message transfer has finished, the i-th element in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • recv_data – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array send_data is sent to the i-th process. When the message transfer has finished, the i-th memory block with the layout recvl in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void alltoallv(const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts senddispls[i] bytes after the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts recvdispls[i] bytes after the address given in recv_data. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void alltoallv(const T *send_data, const layouts<T> &sendls, T *recv_data, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts at the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts at the address given in recv_data. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send- or receive blocks. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline irequest ialltoallv(const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts senddispls[i] bytes after the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts recvdispls[i] bytes after the address given in recv_data. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(const T *send_data, const layouts<T> &sendls, T *recv_data, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts at the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts at the address given in recv_data. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send- or receive blocks. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation if rank equals root_rank

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation if rank equals root_rank, may be nullptr if rank does no equal to root_rank

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation if rank equals root_rank

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation if rank equals root_rank, may be nullptr if rank does no equal to root_rank

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void allreduce(F f, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes and broadcasts the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void allreduce(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iallreduce(F f, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void scan(F f, const T &send_data, T &recv_data) const#

Performs partial reduction operation (scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void scan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iscan(F f, const T &send_data, T &recv_data) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void exscan(F f, const T &send_data, T &recv_data) const#

Performs partial reduction operation (exclusive scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void exscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iexscan(F f, const T &send_data, T &recv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

inline MPI_Comm native_handle() const#

Get the underlying MPI handle of the communicator.

Note

This function returns a non-owning handle to the underlying MPI communicator, which may be useful when refactoring legacy MPI applications to MPL.

Warning

The handle must not be used to modify the MPI communicator that the handle points to. This method will be removed in a future version.

Returns:

MPI handle of the communicator

inline bool is_valid() const#

Checks if a communicator is valid, i.e., is not an empty communicator with no associated process.

Note

A default constructed communicator is a non valid communicator.

Returns:

true if communicator is valid

inline void abort(int err) const#

Aborts all processes associated to the communicator.

Note

Method provides just a “best attempt” to abort processes.

Parameters:

err – error code, becomes the return code of the main program

template<typename T>
inline void send(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking standard send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void send(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void send(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest isend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking standard send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest isend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest isend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest send_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking standard send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest send_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest send_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline int bsend_size(int number = 1) const#

Determines the message buffer size.

Template Parameters:

T – type of the data to send in a later buffered send operation, must meet the requirements as described in the Supported data types section

Parameters:

number – quantity of elements of type T to send in a single buffered message or in a series of buffered send operations

Returns:

message buffer size

template<typename T>
inline int bsend_size(const layout<T> &l, int number = 1) const#

Determines the message buffer size.

Template Parameters:

T – type of the data to send in a later buffered send operation, must meet the requirements as described in the Supported data types section

Parameters:
  • l – layout of the data

  • number – quantity of buffered send operations with the given data type and layout

Returns:

message buffer size

template<typename T>
inline void bsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a buffered send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void bsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void bsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest ibsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking buffered send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ibsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest ibsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest bsend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a buffered send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest bsend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest bsend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline void ssend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking synchronous send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void ssend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void ssend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest issend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking synchronous send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest issend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest issend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest ssend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking synchronous send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest ssend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest ssend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline void rsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking ready send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void rsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void rsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest irsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking ready send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest irsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest irsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest rsend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking ready send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest rsend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest rsend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline status_t recv(T &data, int source, tag_t t = tag_t{0}) const#

Receives a message with a single value.

Note

Receiving STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename T>
inline status_t recv(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values having a specific memory layout.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename iterT>
inline status_t recv(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values given by a pair of iterators.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename T>
inline irequest irecv(T &data, int source, tag_t t = tag_t{0}) const#

Receives a message with a single value via a non-blocking receive operation.

Note

Receiving STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing receive operation

template<typename T>
inline irequest irecv(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Receives a message with several values having a specific memory layout via a non-blocking receive operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing receive operation

template<typename iterT>
inline irequest irecv(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values given by a pair of iterators via a non-blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest recv_init(T &data, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a single value via a blocking receive operation.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest recv_init(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest recv_init(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a several values given by a pair of iterators via a blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending ing process

  • t – tag associated to this message

Returns:

persistent communication request

inline status_t probe(int source, tag_t t = tag_t{0}) const#

Blocking test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the pending message

inline std::optional<status_t> iprobe(int source, tag_t t = tag_t{0}) const#

Non-blocking test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the pending message if there is any pending message

inline mprobe_status mprobe(int source, tag_t t = tag_t{0}) const#

Blocking matched test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

message handle and status of the pending message

inline std::optional<mprobe_status> improbe(int source, tag_t t = tag_t{0}) const#

Blocking matched test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

message handle and status of the pending message if there is a pending message by the given source and with the given tag

template<typename T>
inline status_t mrecv(T &data, message_t &m) const#

Receives a message with a single value by a message handle.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename T>
inline status_t mrecv(T *data, const layout<T> &l, message_t &m) const#

Receives a message with a several values having a specific memory layout by a message handle.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename iterT>
inline status_t mrecv(iterT begin, iterT end, message_t &m) const#

Receives a message with a several values given by a pair of iterators by a message handle.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename T>
inline irequest imrecv(T &data, message_t &m) const#

Receives a message with a single value via a non-blocking receive operation by a message handle.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing receive operation

template<typename T>
inline irequest imrecv(T *data, const layout<T> &l, message_t &m) const#

Receives a message with several values having a specific memory layout via a non-blocking receive operation by a message handle.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing receive operation

template<typename iterT>
inline irequest imrecv(iterT begin, iterT end, message_t &m) const#

Receives a message with a several values given by a pair of iterators via a non-blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline status_t sendrecv(const T &send_data, int destination, tag_t send_tag, T &recv_data, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • recv_data – data to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv(const T *send_data, const layout<T> &sendl, int destination, tag_t send_tag, T *recv_data, const layout<T> &recvl, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename iterT1, typename iterT2>
inline status_t sendrecv(iterT1 begin_1, iterT1 end_1, int destination, tag_t send_tag, iterT2 begin_2, iterT2 end_2, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:
Parameters:
  • begin_1 – iterator pointing to the first data value to send

  • end_1 – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • begin_2 – iterator pointing to the first data value to receive

  • end_2 – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv_replace(T &data, int destination, tag_t send_tag, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – data to send, will hold the received data

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv_replace(T *data, const layout<T> &l, int destination, tag_t send_tag, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – data to send, will hold the received data

  • l – memory layout of the data to send and receive

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename iterT>
inline status_t sendrecv_replace(iterT begin, iterT end, int destination, tag_t send_tag, int source, tag_t recvtag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send and to receive

  • end – iterator pointing one element beyond the last data value to send and to receive

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recvtag – tag associated to the data to receive

Returns:

status of the receive operation

inline void barrier() const#

Blocks until all processes in the communicator have reached this method.

Note

This is a collective operation and must be called by all processes in the communicator.

inline irequest ibarrier() const#

Notifies the process that it has reached the barrier and returns immediately.

Note

This is a collective operation and must be called by all processes in the communicator.

Returns:

communication request

template<typename T>
inline void bcast(int root_rank, T &data) const#

Broadcasts a message from a process to all other processes.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

template<typename T>
inline void bcast(int root_rank, T *data, const layout<T> &l) const#

Broadcasts a message from a process to all other processes.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

  • l – memory layout of the data to send/receive

template<typename T>
inline irequest ibcast(int root_rank, T &data) const#

Broadcasts a message from a process to all other processes in a non-blocking manner.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ibcast(int root_rank, T *data, const layout<T> &l) const#

Broadcasts a message from a process to all other processes in a non-blocking manner.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

  • l – memory layout of the data to send/receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void gather(int root_rank, const T &send_data, T *recv_data) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

template<typename T>
inline void gather(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvl – memory layout of the data to receive

template<typename T>
inline void gather(int root_rank, const T &send_data) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

template<typename T>
inline void gather(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

template<typename T>
inline irequest igather(int root_rank, const T &send_data, T *recv_data) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T &send_data) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

  • recvdispls – displacements of the data to receive by the root rank

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

  • recvdispls – displacements of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline void allgather(const T &send_data, T *recv_data) const#

Gather messages from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages

template<typename T>
inline void allgather(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

template<typename T>
inline irequest iallgather(const T &send_data, T *recv_data) const#

Gather messages from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iallgather(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void allgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void allgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline irequest iallgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iallgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void scatter(int root_rank, const T *send_data, T &recv_data) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • recv_data – data to receive

template<typename T>
inline void scatter(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendl – memory layout of the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

template<typename T>
inline void scatter(int root_rank, T &recv_data) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

template<typename T>
inline void scatter(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

template<typename T>
inline irequest iscatter(int root_rank, const T *send_data, T &recv_data) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • recv_data – data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendl – memory layout of the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, T &recv_data) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void scatterv(int root_rank, const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send by the root rank

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline void scatterv(int root_rank, const T *send_data, const layouts<T> &sendls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline void scatterv(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline irequest iscatterv(int root_rank, const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send by the root rank

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatterv(int root_rank, const T *send_data, const layouts<T> &sendls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatterv(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T, typename F>
inline void reduce_scatter_block(F f, const T *send_data, T &recv_data) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the size of the communicator

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void reduce_scatter_block(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &recvcount) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the size of the communicator times the number of elements given by the layout parameter

  • recv_data – will hold the results of the reduction operation

  • recvcount – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce_scatter_block(F f, const T *send_data, T &recv_data) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation, number of elements in buffer send_data must equal the size of the communicator

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce_scatter_block(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &recvcount) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation, number of elements in buffer send_data must equal the size of the communicator times the number of elements given by the layout parameter

  • recv_data – will hold the results of the reduction operation

  • recvcount – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void reduce_scatter(F f, const T *send_data, T *recv_data, const contiguous_layouts<T> &recvcounts) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the sum of the number of elements given by the collection of layout parameters

  • recv_data – will hold the results of the reduction operation

  • recvcounts – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce_scatter(F f, const T *send_data, T *recv_data, contiguous_layouts<T> &recvcounts) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the sum of the number of elements given by the collection of layout parameters

  • recv_data – will hold the results of the reduction operation

  • recvcounts – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

Public Static Attributes

static constexpr merge_order_type order_low = merge_order_type::order_low#

indicates that when merging the local and the remote groups of an inter-communicator put processes of this group before processes that belong to the other group

static constexpr merge_order_type order_high = merge_order_type::order_high#

indicates that when merging the local and the remote groups of an inter-communicator put processes of this group after processes that belong to the other group

static constexpr equality_type identical = equality_type::identical#

indicates that communicators are identical, i.e., communicators represent the same communication context

static constexpr equality_type congruent = equality_type::congruent#

indicates that communicators are identical, i.e., communicators have same the members in same rank order but different context

static constexpr equality_type similar = equality_type::similar#

indicates that communicators are similar, i.e., communicators have same tha members in different rank order

static constexpr equality_type unequal = equality_type::unequal#

indicates that communicators are unequal, i.e., communicators have different sets of members

static constexpr comm_collective_tag comm_collective = {}#

Indicates the creation of a new communicator by an operation that is collective for all processes in the given communicator.

static constexpr group_collective_tag group_collective = {}#

Indicates the creation of a new communicator by an operation that is collective for all processes in the given group.

static constexpr split_tag split = {}#

Indicates the creation of a new communicator by spitting an existing communicator into disjoint subgroups.

static constexpr split_shared_memory_tag split_shared_memory = {}#

Indicates the creation of a new communicator by spitting an existing communicator into disjoint subgroups each of which can create a shared memory region.

Friends

friend class group
friend class cartesian_communicator
friend class graph_communicator
friend class distributed_graph_communicator
friend class inter_communicator
friend class environment::detail::env
friend class file

Cartesian communicators#

class cartesian_communicator : public topology_communicator#

Communicator with Cartesian topology.

Public Types

enum class periodicity_tag#

Periodicity indicator for a dimension in a Cartesian process topology.

Values:

enumerator non_periodic#

dimension is non-periodic

enumerator periodic#

dimension is periodic

enum class included_tag : int#

Inclusion indicator that is employed when creating a new communicator with Cartesian process topology.

Values:

enumerator excluded#

dimension is excluded from the new communicator

enumerator included#

dimension is included in the new communicator

enum class merge_order_type#

Specifies the process order when merging the local and the remote groups of an inter-communicator into a communicator.

Values:

enumerator order_low#

when merging the local and the remote groups of an inter-communicator put processes of this group before processes that belong to the other group

enumerator order_high#

when merging the local and the remote groups of an inter-communicator put processes of this group after processes that belong to the other group

enum class equality_type#

Equality types for communicator comparison.

Values:

enumerator identical#

communicators are identical, i.e., communicators represent the same communication context

enumerator congruent#

communicators are identical, i.e., communicators have the same members in same rank order but a different context

enumerator similar#

communicators are similar, i.e., communicators have same the members in different rank order

enumerator unequal#

communicators are unequal, i.e., communicators have different sets of members

Public Functions

cartesian_communicator() = default#

Creates an empty communicator with no associated process.

inline cartesian_communicator(const cartesian_communicator &other)#

Creates a new communicator which is equivalent to an existing one.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other. Communicators should not be copied unless a new independent communicator is wanted. Communicators should be passed via references to functions to avoid unnecessary copying.

Parameters:

other – the other communicator to copy from

inline explicit cartesian_communicator(const communicator &other, const dimensions &dims, bool reorder = true)#

Creates a new communicator with Cartesian process topology.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other with the same arguments.

Parameters:
  • other – communicator containing the processes to use in the creation of the new communicator

  • dims – represents the dimensional information of the process grid

  • reorder – indicates if reordering is permitted, if false each process will have the same rank in the new communicator as in the old one

inline explicit cartesian_communicator(const cartesian_communicator &other, const included_tags &is_included)#

Creates a new communicator with Cartesian process topology by partitioning a Cartesian topology.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other with the same arguments.

Parameters:
  • other – communicator containing the processes to use in the creation of the new communicator

  • is_included – indicates along which dimensions to arrange sub-grids

inline cartesian_communicator(cartesian_communicator &&other) noexcept#

Move-constructs a communicator.

Parameters:

other – the other communicator to move from

inline cartesian_communicator &operator=(const cartesian_communicator &other) noexcept#

Copy-assigns and creates a new communicator with Cartesian process topology which is equivalent to an existing one.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other. Communicators should not be copied unless a new independent communicator is wanted. Communicators should be passed via references to functions to avoid unnecessary copying.

Parameters:

other – the other communicator to copy from

inline cartesian_communicator &operator=(cartesian_communicator &&other) noexcept#

Move-assigns a communicator.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other.

Parameters:

other – the other communicator to move from

inline int dimensionality() const#

Determines the communicator’s dimensionality.

Returns:

number of dimensions of the Cartesian topology

inline int rank(const vector &coordinate) const#

Determines process rank of a process at a given Cartesian location.

Parameters:

coordinate – Cartesian location

Returns:

process rank

inline vector coordinates(int rank) const#

Determines the Cartesian location of a process with a given rank.

Parameters:

rank – process rank

Returns:

Cartesian location

inline vector coordinates() const#

Determines the Cartesian location of this process.

Returns:

Cartesian location

inline dimensions get_dimensions() const#

Determines the size and the periodicity of each dimension of the communicator with Cartesian topology.

Returns:

size and periodicity of each dimension

inline shift_ranks shift(int direction, int displacement) const#

Finds the ranks of processes that can be reached by shifting the Cartesian grid.

This method permits to find the two processes that would respectively reach, and be reached by, the calling process by shifting the Cartesian grid by the given number of displacements along the given direction. In case no such process exists, located outside the boundaries of a non-periodic dimension for instance, proc_null is returned instead.

Parameters:
  • direction – shift direction

  • displacement – shift size

inline int rank() const#

Determines the rank within a communicator.

Returns:

the rank of the calling process in the communicator

template<typename T>
inline void neighbor_allgather(const T &senddata, T *recvdata) const#

Gather messages from all neighboring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • recvdata – pointer to continuous storage for incoming messages

template<typename T>
inline void neighbor_allgather(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Gather messages from all neighboring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

template<typename T>
inline mpl::irequest ineighbor_allgather(const T &senddata, T *recvdata) const#

Gather messages from all neighboring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • recvdata – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_allgather(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Gather messages from all neighboring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void neighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all neighbouring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void neighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all neighbouring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline mpl::irequest ineighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void neighbor_alltoall(const T *senddata, T *recvdata) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes.

Each process in the communicator sends one element of type T to each neighbouring process and receives one element of type T from each neighbouring process. The i-th element in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th element in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • recvdata – pointer to continuous storage for incoming messages

template<typename T>
inline void neighbor_alltoall(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes.

Each process in the communicator sends elements of type T to each neighbouring process and receives elements of type T from each neighbouring process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th memory block with the layout recvl in the array recvdata was received from the i-th neigbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

template<typename T>
inline mpl::irequest ineighbor_alltoall(const T *senddata, T *recvdata) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends one element of type T to each neighbouring process and receives one element of type T from each neighbouring process. The i-th element in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th element in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • recvdata – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_alltoall(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each neighbouring process and receives elements of type T from each neighbouring process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th memory block with the layout recvl in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void neighbor_alltoallv(const T *senddata, const layouts<T> &sendls, const displacements &senddispls, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes.

Each process in the communicator sends elements of type T to each neighbor and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts senddispls[i] bytes after the address given in senddata. The i-th memory block is sent to the i-th neighbor. The i-th memory block with the layout recvls[i] in the array recvdata starts recvdispls[i] bytes after the address given in recvdata. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbor.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void neighbor_alltoallv(const T *senddata, const layouts<T> &sendls, T *recvdata, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes.

Each process in the communicator sends elements of type T to each neighbour and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts at the address given in senddata. The i-th memory block is sent to the i-th neighbour. The i-th memory block with the layout recvls[i] in the array recvdata starts at the address given in recvdata. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send blocks or receive blocks. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline mpl::irequest ineighbor_alltoallv(const T *senddata, const layouts<T> &sendls, const displacements &senddispls, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each neighbor and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts senddispls[i] bytes after the address given in senddata. The i-th memory block is sent to the i-th neighbor. The i-th memory block with the layout recvls[i] in the array recvdata starts recvdispls[i] bytes after the address given in recvdata. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbor.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_alltoallv(const T *senddata, const layouts<T> &sendls, T *recvdata, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each neighbour and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts at the address given in senddata. The i-th memory block is sent to the i-th neighbour. The i-th memory block with the layout recvls[i] in the array recvdata starts at the address given in recvdata. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send blocks or receive blocks. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

inline int size() const#

Determines the total number of processes in a communicator.

Returns:

number of processes

inline void info(const mpl::info &i) const#

Updates the hints of the communicator.

Parameters:

i – info object with new hints

inline mpl::info info() const#

Get the the hints of the communicator.

Returns:

hints of the communicator

inline bool operator==(const communicator &other) const#

Tests for identity of communicators.

Parameters:

other – communicator to compare with

Returns:

true if identical

inline bool operator!=(const communicator &other) const#

Tests for identity of communicators.

Parameters:

other – communicator to compare with

Returns:

true if not identical

inline equality_type compare(const communicator &other) const#

Compares to another communicator.

Parameters:

other – communicator to compare with

Returns:

equality type

template<typename T>
inline void alltoall(T *sendrecv_data) const#

Sends messages to all processes and receives messages from all processes, in-place version.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array sendrecv_data is sent to the i-th process. When the function has finished, the i-th element in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:

sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

template<typename T>
inline void alltoall(T *sendrecv_data, const layout<T> &sendrecvl) const#

Sends messages to all processes and receives messages from all processes, in-place version.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendrecvl. The i-th memory block with the layout sendrecvl in the array sendrecv_data is sent to the i-th process. When the function has finished, the i-th memory block with the layout sendrecvl in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

  • sendrecvl – memory layouts of the data to send and to receive

template<typename T>
inline void alltoall(const T *send_data, T *recv_data) const#

Sends messages to all processes and receives messages from all processes.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array send_data is sent to the i-th process. When the function has finished, the i-th element in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • recv_data – pointer to continuous storage for incoming messages

template<typename T>
inline void alltoall(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Sends messages to all processes and receives messages from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array send_data is sent to the i-th process. When the function has finished, the i-th memory block with the layout recvl in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

template<typename T>
inline irequest ialltoall(T *sendrecv_data) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner, in-place version.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array sendrecv_data is sent to the i-th process. When the message transfer has finished, the i-th element in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:

sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(T *sendrecv_data, const layout<T> &sendrecvl) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner, in-place version.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendrecvl. The i-th memory block with the layout sendrecvl in the array sendrecv_data is sent to the i-th process. When the message transfer has finished, the i-th memory block with the layout sendrecvl in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

  • sendrecvl – memory layouts of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(const T *send_data, T *recv_data) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array send_data is sent to the i-th process. When the message transfer has finished, the i-th element in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • recv_data – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array send_data is sent to the i-th process. When the message transfer has finished, the i-th memory block with the layout recvl in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void alltoallv(T *sendrecv_data, const layouts<T> &sendrecvls, const displacements &sendrecvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendecvdata. The i-th memory block with the layout sendlrecvs[i] in the array sendrecv_data starts sendrecvdispls[i] bytes after the address given in sendrecv_data. The i-th memory block is sent to the i-th process. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing and incoming messages

  • sendrecvls – memory layouts of the data to send and to receive

  • sendrecvdispls – displacements of the data to send and to receive

template<typename T>
inline void alltoallv(T *sendrecv_data, const layouts<T> &sendrecvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendrecv_data. The i-th memory block with the layout sendrecvls[i] in the array sendrecv_data starts at the address given in sendrecv_data. The i-th memory block is sent to the i-th process. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send-receive blocks. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for incoming and outgoing messages

  • sendrecvls – memory layouts of the data to send and to receive

template<typename T>
inline void alltoallv(const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts senddispls[i] bytes after the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts recvdispls[i] bytes after the address given in recv_data. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void alltoallv(const T *send_data, const layouts<T> &sendls, T *recv_data, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts at the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts at the address given in recv_data. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send- or receive blocks. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline irequest ialltoallv(T *sendrecv_data, const layouts<T> &sendrecvls, const displacements &sendrecvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendecvdata. The i-th memory block with the layout sendlrecvs[i] in the array sendrecv_data starts sendrecvdispls[i] bytes after the address given in sendrecv_data. The i-th memory block is sent to the i-th process. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing and incoming messages

  • sendrecvls – memory layouts of the data to send and to receive

  • sendrecvdispls – displacements of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(T *sendrecv_data, const layouts<T> &sendrecvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendrecv_data. The i-th memory block with the layout sendrecvls[i] in the array sendrecv_data starts at the address given in sendrecv_data. The i-th memory block is sent to the i-th process. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send-receive blocks. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the

Parameters:
  • sendrecv_data – pointer to continuous storage for incoming and outgoing messages

  • sendrecvls – memory layouts of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts senddispls[i] bytes after the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts recvdispls[i] bytes after the address given in recv_data. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(const T *send_data, const layouts<T> &sendls, T *recv_data, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts at the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts at the address given in recv_data. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send- or receive blocks. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T, typename F>
inline void reduce(F f, int root_rank, T &sendrecv_data) const#

Performs a reduction operation over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input data for the reduction operation, will hold the result of the reduction operation if rank equals root_rank

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T &send_data) const#

Performs a reduction operation over all processes, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input data for the reduction operation

template<typename T, typename F>
inline void reduce(F f, int root_rank, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input buffer for the reduction operation, will hold the results of the reduction operation if rank equals root_rank

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T *send_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation if rank equals root_rank

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation if rank equals root_rank, may be nullptr if rank does no equal to root_rank

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, T &sendrecv_data) const#

Performs a reduction operation over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input data for the reduction operation, will hold the result of the reduction operation if rank equals root_rank

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T &send_data) const#

Performs a reduction operation over all processes in a non-blocking manner, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input buffer for the reduction operation, will hold the results of the reduction operation if rank equals root_rank

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T *send_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in a non-blocking manner, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation if rank equals root_rank

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation if rank equals root_rank, may be nullptr if rank does no equal to root_rank

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void allreduce(F f, T &sendrecv_data) const#

Performs a reduction operation over all processes and broadcasts the result, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void allreduce(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void allreduce(F f, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes and broadcasts the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void allreduce(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iallreduce(F f, T &sendrecv_data) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result in non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void scan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void scan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void scan(F f, const T &send_data, T &recv_data) const#

Performs partial reduction operation (scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void scan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction (scan) operation over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, const T &send_data, T &recv_data) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void exscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void exscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void exscan(F f, const T &send_data, T &recv_data) const#

Performs partial reduction operation (exclusive scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void exscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iexscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, const T &send_data, T &recv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

inline inter_communicator spawn(int root_rank, int max_procs, const command_line &command) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • max_procs – number of processes to span

  • command – command and command-line options to the processes that are spawned

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn(int root_rank, int max_procs, const command_line &command, const mpl::info &i) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • max_procs – number of processes to span

  • command – command and command-line options to the processes that are spawned

  • i – info object telling the underlying MPI runtime how to spawn the new processes

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn(int root_rank) const#

Spawns new processes and establishes communication, non-root variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:

root_rank – the root process

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank, const command_lines &commands) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • commands – command and command-line options to the processes that are spawned

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank, const command_lines &commands, const mpl::infos &i) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • commands – command and command-line options to the processes that are spawned

  • i – list of info object telling the underlying MPI runtime how to spawn the new processes

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank) const#

Spawns new processes and establishes communication, non-root variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:

root_rank – the root process

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline MPI_Comm native_handle() const#

Get the underlying MPI handle of the communicator.

Note

This function returns a non-owning handle to the underlying MPI communicator, which may be useful when refactoring legacy MPI applications to MPL.

Warning

The handle must not be used to modify the MPI communicator that the handle points to. This method will be removed in a future version.

Returns:

MPI handle of the communicator

inline bool is_valid() const#

Checks if a communicator is valid, i.e., is not an empty communicator with no associated process.

Note

A default constructed communicator is a non valid communicator.

Returns:

true if communicator is valid

inline void abort(int err) const#

Aborts all processes associated to the communicator.

Note

Method provides just a “best attempt” to abort processes.

Parameters:

err – error code, becomes the return code of the main program

template<typename T>
inline void send(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking standard send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void send(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void send(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest isend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking standard send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest isend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest isend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest send_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking standard send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest send_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest send_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline int bsend_size(int number = 1) const#

Determines the message buffer size.

Template Parameters:

T – type of the data to send in a later buffered send operation, must meet the requirements as described in the Supported data types section

Parameters:

number – quantity of elements of type T to send in a single buffered message or in a series of buffered send operations

Returns:

message buffer size

template<typename T>
inline int bsend_size(const layout<T> &l, int number = 1) const#

Determines the message buffer size.

Template Parameters:

T – type of the data to send in a later buffered send operation, must meet the requirements as described in the Supported data types section

Parameters:
  • l – layout of the data

  • number – quantity of buffered send operations with the given data type and layout

Returns:

message buffer size

template<typename T>
inline void bsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a buffered send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void bsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void bsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest ibsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking buffered send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ibsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest ibsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest bsend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a buffered send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest bsend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest bsend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline void ssend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking synchronous send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void ssend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void ssend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest issend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking synchronous send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest issend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest issend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest ssend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking synchronous send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest ssend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest ssend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline void rsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking ready send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void rsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void rsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest irsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking ready send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest irsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest irsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest rsend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking ready send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest rsend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest rsend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline status_t recv(T &data, int source, tag_t t = tag_t{0}) const#

Receives a message with a single value.

Note

Receiving STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename T>
inline status_t recv(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values having a specific memory layout.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename iterT>
inline status_t recv(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values given by a pair of iterators.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename T>
inline irequest irecv(T &data, int source, tag_t t = tag_t{0}) const#

Receives a message with a single value via a non-blocking receive operation.

Note

Receiving STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing receive operation

template<typename T>
inline irequest irecv(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Receives a message with several values having a specific memory layout via a non-blocking receive operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing receive operation

template<typename iterT>
inline irequest irecv(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values given by a pair of iterators via a non-blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest recv_init(T &data, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a single value via a blocking receive operation.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest recv_init(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest recv_init(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a several values given by a pair of iterators via a blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending ing process

  • t – tag associated to this message

Returns:

persistent communication request

inline status_t probe(int source, tag_t t = tag_t{0}) const#

Blocking test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the pending message

inline std::optional<status_t> iprobe(int source, tag_t t = tag_t{0}) const#

Non-blocking test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the pending message if there is any pending message

inline mprobe_status mprobe(int source, tag_t t = tag_t{0}) const#

Blocking matched test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

message handle and status of the pending message

inline std::optional<mprobe_status> improbe(int source, tag_t t = tag_t{0}) const#

Blocking matched test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

message handle and status of the pending message if there is a pending message by the given source and with the given tag

template<typename T>
inline status_t mrecv(T &data, message_t &m) const#

Receives a message with a single value by a message handle.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename T>
inline status_t mrecv(T *data, const layout<T> &l, message_t &m) const#

Receives a message with a several values having a specific memory layout by a message handle.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename iterT>
inline status_t mrecv(iterT begin, iterT end, message_t &m) const#

Receives a message with a several values given by a pair of iterators by a message handle.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename T>
inline irequest imrecv(T &data, message_t &m) const#

Receives a message with a single value via a non-blocking receive operation by a message handle.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing receive operation

template<typename T>
inline irequest imrecv(T *data, const layout<T> &l, message_t &m) const#

Receives a message with several values having a specific memory layout via a non-blocking receive operation by a message handle.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing receive operation

template<typename iterT>
inline irequest imrecv(iterT begin, iterT end, message_t &m) const#

Receives a message with a several values given by a pair of iterators via a non-blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline status_t sendrecv(const T &send_data, int destination, tag_t send_tag, T &recv_data, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • recv_data – data to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv(const T *send_data, const layout<T> &sendl, int destination, tag_t send_tag, T *recv_data, const layout<T> &recvl, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename iterT1, typename iterT2>
inline status_t sendrecv(iterT1 begin_1, iterT1 end_1, int destination, tag_t send_tag, iterT2 begin_2, iterT2 end_2, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:
Parameters:
  • begin_1 – iterator pointing to the first data value to send

  • end_1 – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • begin_2 – iterator pointing to the first data value to receive

  • end_2 – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv_replace(T &data, int destination, tag_t send_tag, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – data to send, will hold the received data

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv_replace(T *data, const layout<T> &l, int destination, tag_t send_tag, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – data to send, will hold the received data

  • l – memory layout of the data to send and receive

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename iterT>
inline status_t sendrecv_replace(iterT begin, iterT end, int destination, tag_t send_tag, int source, tag_t recvtag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send and to receive

  • end – iterator pointing one element beyond the last data value to send and to receive

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recvtag – tag associated to the data to receive

Returns:

status of the receive operation

inline void barrier() const#

Blocks until all processes in the communicator have reached this method.

Note

This is a collective operation and must be called by all processes in the communicator.

inline irequest ibarrier() const#

Notifies the process that it has reached the barrier and returns immediately.

Note

This is a collective operation and must be called by all processes in the communicator.

Returns:

communication request

template<typename T>
inline void bcast(int root_rank, T &data) const#

Broadcasts a message from a process to all other processes.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

template<typename T>
inline void bcast(int root_rank, T *data, const layout<T> &l) const#

Broadcasts a message from a process to all other processes.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

  • l – memory layout of the data to send/receive

template<typename T>
inline irequest ibcast(int root_rank, T &data) const#

Broadcasts a message from a process to all other processes in a non-blocking manner.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ibcast(int root_rank, T *data, const layout<T> &l) const#

Broadcasts a message from a process to all other processes in a non-blocking manner.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

  • l – memory layout of the data to send/receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void gather(int root_rank, const T &send_data, T *recv_data) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

template<typename T>
inline void gather(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvl – memory layout of the data to receive

template<typename T>
inline void gather(int root_rank, const T &send_data) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

template<typename T>
inline void gather(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

template<typename T>
inline irequest igather(int root_rank, const T &send_data, T *recv_data) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T &send_data) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

  • recvdispls – displacements of the data to receive by the root rank

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

  • recvdispls – displacements of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline void allgather(const T &send_data, T *recv_data) const#

Gather messages from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages

template<typename T>
inline void allgather(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

template<typename T>
inline irequest iallgather(const T &send_data, T *recv_data) const#

Gather messages from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iallgather(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void allgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void allgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline irequest iallgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iallgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void scatter(int root_rank, const T *send_data, T &recv_data) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • recv_data – data to receive

template<typename T>
inline void scatter(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendl – memory layout of the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

template<typename T>
inline void scatter(int root_rank, T &recv_data) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

template<typename T>
inline void scatter(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

template<typename T>
inline irequest iscatter(int root_rank, const T *send_data, T &recv_data) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • recv_data – data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendl – memory layout of the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, T &recv_data) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void scatterv(int root_rank, const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send by the root rank

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline void scatterv(int root_rank, const T *send_data, const layouts<T> &sendls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline void scatterv(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline irequest iscatterv(int root_rank, const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send by the root rank

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatterv(int root_rank, const T *send_data, const layouts<T> &sendls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatterv(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T, typename F>
inline void reduce_scatter_block(F f, const T *send_data, T &recv_data) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the size of the communicator

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void reduce_scatter_block(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &recvcount) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the size of the communicator times the number of elements given by the layout parameter

  • recv_data – will hold the results of the reduction operation

  • recvcount – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce_scatter_block(F f, const T *send_data, T &recv_data) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation, number of elements in buffer send_data must equal the size of the communicator

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce_scatter_block(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &recvcount) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation, number of elements in buffer send_data must equal the size of the communicator times the number of elements given by the layout parameter

  • recv_data – will hold the results of the reduction operation

  • recvcount – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void reduce_scatter(F f, const T *send_data, T *recv_data, const contiguous_layouts<T> &recvcounts) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the sum of the number of elements given by the collection of layout parameters

  • recv_data – will hold the results of the reduction operation

  • recvcounts – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce_scatter(F f, const T *send_data, T *recv_data, contiguous_layouts<T> &recvcounts) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the sum of the number of elements given by the collection of layout parameters

  • recv_data – will hold the results of the reduction operation

  • recvcounts – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

Public Static Attributes

static constexpr periodicity_tag non_periodic = periodicity_tag::non_periodic#

indicates that a dimension in a Cartesian process topology is non-periodic

static constexpr periodicity_tag periodic = periodicity_tag::periodic#

indicates that a dimension in a Cartesian process topology is periodic

static constexpr included_tag excluded = included_tag::excluded#

indicates that a dimension is excluded from the new communicator

static constexpr included_tag included = included_tag::included#

indicates that a dimension is included in the new communicator

static constexpr merge_order_type order_low = merge_order_type::order_low#

indicates that when merging the local and the remote groups of an inter-communicator put processes of this group before processes that belong to the other group

static constexpr merge_order_type order_high = merge_order_type::order_high#

indicates that when merging the local and the remote groups of an inter-communicator put processes of this group after processes that belong to the other group

static constexpr equality_type identical = equality_type::identical#

indicates that communicators are identical, i.e., communicators represent the same communication context

static constexpr equality_type congruent = equality_type::congruent#

indicates that communicators are identical, i.e., communicators have same the members in same rank order but different context

static constexpr equality_type similar = equality_type::similar#

indicates that communicators are similar, i.e., communicators have same tha members in different rank order

static constexpr equality_type unequal = equality_type::unequal#

indicates that communicators are unequal, i.e., communicators have different sets of members

static constexpr comm_collective_tag comm_collective = {}#

Indicates the creation of a new communicator by an operation that is collective for all processes in the given communicator.

static constexpr group_collective_tag group_collective = {}#

Indicates the creation of a new communicator by an operation that is collective for all processes in the given group.

static constexpr split_tag split = {}#

Indicates the creation of a new communicator by spitting an existing communicator into disjoint subgroups.

static constexpr split_shared_memory_tag split_shared_memory = {}#

Indicates the creation of a new communicator by spitting an existing communicator into disjoint subgroups each of which can create a shared memory region.

class dimensions#

Characterizes the dimensionality, size and periodicity of a communicator with Cartesian process topology.

Public Types

using value_type = std::tuple<int, periodicity_tag>#
using reference = dimension_periodicity_proxy#
using const_reference = std::tuple<int, periodicity_tag>#

Public Functions

dimensions() = default#

Constructs a new empty dimensions object.

inline explicit dimensions(int size)#

Constructs a new dimensions object.

Characterizes a communicator with Cartesian process topology. Its dimension equals the give parameter. Along all dimensions, no periodicity is defined. The size, i.e., the number of processes, along each dimension is zero.

Note

A dimension object that is created by this constructor must be passed to dims_create before a new Cartesian communicator can be created.

Parameters:

size – dimensionality (number of Cartesian dimensions)

inline dimensions(std::initializer_list<periodicity_tag> list)#

Constructs a new dimensions object.

Characterizes a communicator with Cartesian process topology. Its dimension equals the number of list elements. The periodicity along the i-th dimension is given by the i-th list element. The size, i.e., the number of processes, along each dimension is zero.

inline dimensions(std::initializer_list<std::tuple<int, periodicity_tag>> list)#

Constructs a new dimensions object.

Characterizes a communicator with Cartesian process topology. Its dimension equals the number of list elements. The size and the periodicity along the i-th dimension is given by the i-th list element.

inline void add(int size, periodicity_tag periodicity)#

Adds a additional dimension to a list of dimensions.

Parameters:
  • size – the size of the new dimension

  • periodicity – the periodicity of the new dimension

inline int dimensionality() const#

Determines the dimensionality.

Returns:

dimensionality (number of dimensions)

inline int size(int dimension) const#

Determines the number of processes along a dimension.

Parameters:

dimension – the rank of the dimension

Returns:

the number of processes

inline periodicity_tag periodicity(int dimension) const#

Determines the periodicity of a dimension.

Parameters:

dimension – the rank of the dimension

Returns:

the periodicity

inline const_reference operator[](int dimension) const#

Determines number of processes along a dimension and the periodicity of a dimension.

Parameters:

dimension – the rank of the dimension

Returns:

the number of processes and the periodicity

inline reference operator[](int dimension)#

Determines number of processes along a dimension and the periodicity of a dimension.

Parameters:

dimension – the rank of the dimension

Returns:

the number of processes and the periodicity

inline iterator begin()#
inline const_iterator begin() const#
inline const_iterator cbegin() const#
inline iterator end()#
inline const_iterator end() const#
inline const_iterator cend() const#

Friends

friend class cartesian_communicator
friend dimensions dims_create(int, dimensions)#

Decomposes a given number of processes over a Cartesian grid made of the number of dimensions specified.

The method attempts to balance the distribution by minimising the difference in the number of processes assigned to each dimension. One can restrict the number of process to allocate to any dimension by specifying a non-zero size for a given dimension in the parameter dims. If the method is not able to find a decomposition while respecting the restrictions given, the routine throws an exception invalid_dims.

Parameters:
  • size – total number of processes (the size of the communicator)

  • dims – dimension object indicating possible restrictions for the process partitioning

Returns:

dimension object

class const_iterator#

Iterator class for constant access.

Public Types

using difference_type = std::ptrdiff_t#
using iterator_category = std::input_iterator_tag#
using value_type = dimensions::value_type#
using pointer = const value_type*#
using reference = dimensions::const_reference#

Public Functions

inline explicit const_iterator(const dimensions *dims, int index = 0)#
inline reference operator*() const#
inline const_iterator &operator++()#
inline const_iterator operator++(int) &#

Friends

inline friend bool operator==(const const_iterator &a, const const_iterator &b)#
inline friend bool operator!=(const const_iterator &a, const const_iterator &b)#
class dimension_periodicity_proxy#

Public Functions

template<std::size_t N>
inline decltype(auto) get() const#
inline dimension_periodicity_proxy &operator=(const std::tuple<int, periodicity_tag> &t)#
inline bool operator==(const std::tuple<int, periodicity_tag> &t) const#
inline bool operator!=(const std::tuple<int, periodicity_tag> &t) const#

Friends

friend class dimensions
class iterator#

Iterator class for non-constant access.

Public Types

using difference_type = std::ptrdiff_t#
using iterator_category = std::input_iterator_tag#
using value_type = dimensions::value_type#
using pointer = value_type*#
using reference = dimensions::reference#

Public Functions

inline explicit iterator(dimensions *dims, int index = 0)#
inline reference operator*() const#
inline iterator &operator++()#
inline iterator operator++(int) &#

Friends

inline friend bool operator==(const iterator &a, const iterator &b)#
inline friend bool operator!=(const iterator &a, const iterator &b)#
class included_tags : private std::vector<included_tag>#

Represents the inclusion or exclusion along all dimensions of a Cartesian process topology when creating a new communicator.

Public Types

using value_type = typename base::value_type#
using reference = typename base::reference#
using const_reference = typename base::const_reference#
using iterator = typename base::iterator#
using const_iterator = typename base::const_iterator#

Public Functions

included_tags() = default#

Creates an empty inclusion tags list.

inline explicit included_tags(int dimension)#

Creates a non-empty inclusion tags list with default values excluded.

Parameters:

dimension – number of elements of the new list

inline included_tags(std::initializer_list<included_tag> init)#

Creates a non-empty inclusion tags list with values given by the list.

Parameters:

init – exclusion or inclusion tags

inline int size() const#

Determines the number of inclusion tags.

Returns:

dimensionality, number of elements in the vector

inline reference operator[](int index)#

Access list element.

Parameters:

index – non-negative index to list element

inline const_reference operator[](int index) const#

Access list element.

Parameters:

index – non-negative index to list element

inline void add(included_tag is_included)#

Add an additional element to the end of the vector.

Parameters:

is_included – value of the new vector element

Friends

friend class cartesian_communicator
class vector : private std::vector<int>#

Represents a discrete position in a Cartesian process topology.

Public Types

using value_type = typename base::value_type#
using reference = typename base::reference#
using const_reference = typename base::const_reference#
using iterator = typename base::iterator#
using const_iterator = typename base::const_iterator#

Public Functions

vector() = default#

Creates a zero-dimensional vector.

inline explicit vector(int dimension)#

Creates a multi-dimensional vector with components equal to zero.

Parameters:

dimension – number of elements of the new vector

inline vector(std::initializer_list<int> init)#

Creates a multi-dimensional vector with components given by the list.

Parameters:

init – vector components

inline int dimensions() const#

Determines the number of dimensions.

Returns:

dimensionality, number of elements in the vector

inline reference operator[](int index)#

Access a vector element.

Parameters:

index – non-negative index to the vector element

inline const_reference operator[](int index) const#

Access a vector element.

Parameters:

index – non-negative index to the vector element

inline void add(int coordinate)#

Add an additional element to the end of the vector.

Parameters:

coordinate – value of the new vector element

Friends

friend class cartesian_communicator

Auxiliary functions and classes for cartesian communicators#

For constructing communicators with a cartesian process topology the following utility function can be used.

inline cartesian_communicator::dimensions mpl::dims_create(int size, cartesian_communicator::dimensions dims)#

Decomposes a given number of processes over a Cartesian grid made of the number of dimensions specified.

The method attempts to balance the distribution by minimising the difference in the number of processes assigned to each dimension. One can restrict the number of process to allocate to any dimension by specifying a non-zero size for a given dimension in the parameter dims. If the method is not able to find a decomposition while respecting the restrictions given, the routine throws an exception invalid_dims.

Parameters:
  • size – total number of processes (the size of the communicator)

  • dims – dimension object indicating possible restrictions for the process partitioning

Returns:

dimension object

struct shift_ranks#

Helper class to represent source and destination ranks within a Cartesian communicator.

Public Members

int source = {0}#
int destination = {0}#

Graph communicators#

class graph_communicator : public topology_communicator#

Communicator with general graph topology.

Public Types

enum class merge_order_type#

Specifies the process order when merging the local and the remote groups of an inter-communicator into a communicator.

Values:

enumerator order_low#

when merging the local and the remote groups of an inter-communicator put processes of this group before processes that belong to the other group

enumerator order_high#

when merging the local and the remote groups of an inter-communicator put processes of this group after processes that belong to the other group

enum class equality_type#

Equality types for communicator comparison.

Values:

enumerator identical#

communicators are identical, i.e., communicators represent the same communication context

enumerator congruent#

communicators are identical, i.e., communicators have the same members in same rank order but a different context

enumerator similar#

communicators are similar, i.e., communicators have same the members in different rank order

enumerator unequal#

communicators are unequal, i.e., communicators have different sets of members

Public Functions

graph_communicator() = default#

Creates an empty communicator with no associated process.

inline graph_communicator(const graph_communicator &other)#

Creates a new communicator which is equivalent to an existing one.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other. Communicators should not be copied unless a new independent communicator is wanted. Communicators should be passed via references to functions to avoid unnecessary copying.

Parameters:

other – the other communicator to copy from

inline graph_communicator(graph_communicator &&other) noexcept#

Move-constructs a communicator.

Parameters:

other – the other communicator to move from

inline explicit graph_communicator(const communicator &other, const edge_set &edges, bool reorder = true)#

Creates a new communicator with graph process topology.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other with the same arguments.

Parameters:
  • other – communicator containing the processes to use in the creation of the new communicator

  • edges – represents graph edges of the new communicator

  • reorder – indicates if reordering is permitted, if false each process will have the same rank in the new communicator as in the old one

inline graph_communicator &operator=(const graph_communicator &other) noexcept#

Copy-assigns and creates a new communicator with graph process topology which is equivalent to an existing one.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other. Communicators should not be copied unless a new independent communicator is wanted. Communicators should be passed via references to functions to avoid unnecessary copying.

Parameters:

other – the other communicator to copy from

inline graph_communicator &operator=(graph_communicator &&other) noexcept#

Move-assigns a communicator.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other.

Parameters:

other – the other communicator to move from

inline int degree(int rank) const#

Determines the number of neighbours of some process.

Parameters:

rank – process rank

Returns:

number of direct neighbours of the process with the given rank

inline int degree() const#

Determines the number of neighbours of the calling process.

Returns:

number of direct neighbours of the calling process

inline node_list neighbors(int rank) const#

Determines the neighbours of some process.

Parameters:

rank – process rank

Returns:

direct neighbours of the process with the given rank

inline node_list neighbors() const#

Determines the neighbours of the calling process.

Returns:

direct neighbours of the calling process

template<typename T>
inline void neighbor_allgather(const T &senddata, T *recvdata) const#

Gather messages from all neighboring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • recvdata – pointer to continuous storage for incoming messages

template<typename T>
inline void neighbor_allgather(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Gather messages from all neighboring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

template<typename T>
inline mpl::irequest ineighbor_allgather(const T &senddata, T *recvdata) const#

Gather messages from all neighboring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • recvdata – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_allgather(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Gather messages from all neighboring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void neighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all neighbouring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void neighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all neighbouring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline mpl::irequest ineighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void neighbor_alltoall(const T *senddata, T *recvdata) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes.

Each process in the communicator sends one element of type T to each neighbouring process and receives one element of type T from each neighbouring process. The i-th element in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th element in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • recvdata – pointer to continuous storage for incoming messages

template<typename T>
inline void neighbor_alltoall(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes.

Each process in the communicator sends elements of type T to each neighbouring process and receives elements of type T from each neighbouring process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th memory block with the layout recvl in the array recvdata was received from the i-th neigbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

template<typename T>
inline mpl::irequest ineighbor_alltoall(const T *senddata, T *recvdata) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends one element of type T to each neighbouring process and receives one element of type T from each neighbouring process. The i-th element in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th element in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • recvdata – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_alltoall(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each neighbouring process and receives elements of type T from each neighbouring process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th memory block with the layout recvl in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void neighbor_alltoallv(const T *senddata, const layouts<T> &sendls, const displacements &senddispls, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes.

Each process in the communicator sends elements of type T to each neighbor and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts senddispls[i] bytes after the address given in senddata. The i-th memory block is sent to the i-th neighbor. The i-th memory block with the layout recvls[i] in the array recvdata starts recvdispls[i] bytes after the address given in recvdata. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbor.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void neighbor_alltoallv(const T *senddata, const layouts<T> &sendls, T *recvdata, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes.

Each process in the communicator sends elements of type T to each neighbour and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts at the address given in senddata. The i-th memory block is sent to the i-th neighbour. The i-th memory block with the layout recvls[i] in the array recvdata starts at the address given in recvdata. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send blocks or receive blocks. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline mpl::irequest ineighbor_alltoallv(const T *senddata, const layouts<T> &sendls, const displacements &senddispls, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each neighbor and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts senddispls[i] bytes after the address given in senddata. The i-th memory block is sent to the i-th neighbor. The i-th memory block with the layout recvls[i] in the array recvdata starts recvdispls[i] bytes after the address given in recvdata. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbor.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_alltoallv(const T *senddata, const layouts<T> &sendls, T *recvdata, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each neighbour and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts at the address given in senddata. The i-th memory block is sent to the i-th neighbour. The i-th memory block with the layout recvls[i] in the array recvdata starts at the address given in recvdata. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send blocks or receive blocks. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

inline int size() const#

Determines the total number of processes in a communicator.

Returns:

number of processes

inline int rank() const#

Determines the rank within a communicator.

Returns:

the rank of the calling process in the communicator

inline void info(const mpl::info &i) const#

Updates the hints of the communicator.

Parameters:

i – info object with new hints

inline mpl::info info() const#

Get the the hints of the communicator.

Returns:

hints of the communicator

inline bool operator==(const communicator &other) const#

Tests for identity of communicators.

Parameters:

other – communicator to compare with

Returns:

true if identical

inline bool operator!=(const communicator &other) const#

Tests for identity of communicators.

Parameters:

other – communicator to compare with

Returns:

true if not identical

inline equality_type compare(const communicator &other) const#

Compares to another communicator.

Parameters:

other – communicator to compare with

Returns:

equality type

template<typename T>
inline void alltoall(T *sendrecv_data) const#

Sends messages to all processes and receives messages from all processes, in-place version.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array sendrecv_data is sent to the i-th process. When the function has finished, the i-th element in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:

sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

template<typename T>
inline void alltoall(T *sendrecv_data, const layout<T> &sendrecvl) const#

Sends messages to all processes and receives messages from all processes, in-place version.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendrecvl. The i-th memory block with the layout sendrecvl in the array sendrecv_data is sent to the i-th process. When the function has finished, the i-th memory block with the layout sendrecvl in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

  • sendrecvl – memory layouts of the data to send and to receive

template<typename T>
inline void alltoall(const T *send_data, T *recv_data) const#

Sends messages to all processes and receives messages from all processes.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array send_data is sent to the i-th process. When the function has finished, the i-th element in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • recv_data – pointer to continuous storage for incoming messages

template<typename T>
inline void alltoall(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Sends messages to all processes and receives messages from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array send_data is sent to the i-th process. When the function has finished, the i-th memory block with the layout recvl in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

template<typename T>
inline irequest ialltoall(T *sendrecv_data) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner, in-place version.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array sendrecv_data is sent to the i-th process. When the message transfer has finished, the i-th element in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:

sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(T *sendrecv_data, const layout<T> &sendrecvl) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner, in-place version.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendrecvl. The i-th memory block with the layout sendrecvl in the array sendrecv_data is sent to the i-th process. When the message transfer has finished, the i-th memory block with the layout sendrecvl in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

  • sendrecvl – memory layouts of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(const T *send_data, T *recv_data) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array send_data is sent to the i-th process. When the message transfer has finished, the i-th element in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • recv_data – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array send_data is sent to the i-th process. When the message transfer has finished, the i-th memory block with the layout recvl in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void alltoallv(T *sendrecv_data, const layouts<T> &sendrecvls, const displacements &sendrecvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendecvdata. The i-th memory block with the layout sendlrecvs[i] in the array sendrecv_data starts sendrecvdispls[i] bytes after the address given in sendrecv_data. The i-th memory block is sent to the i-th process. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing and incoming messages

  • sendrecvls – memory layouts of the data to send and to receive

  • sendrecvdispls – displacements of the data to send and to receive

template<typename T>
inline void alltoallv(T *sendrecv_data, const layouts<T> &sendrecvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendrecv_data. The i-th memory block with the layout sendrecvls[i] in the array sendrecv_data starts at the address given in sendrecv_data. The i-th memory block is sent to the i-th process. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send-receive blocks. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for incoming and outgoing messages

  • sendrecvls – memory layouts of the data to send and to receive

template<typename T>
inline void alltoallv(const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts senddispls[i] bytes after the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts recvdispls[i] bytes after the address given in recv_data. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void alltoallv(const T *send_data, const layouts<T> &sendls, T *recv_data, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts at the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts at the address given in recv_data. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send- or receive blocks. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline irequest ialltoallv(T *sendrecv_data, const layouts<T> &sendrecvls, const displacements &sendrecvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendecvdata. The i-th memory block with the layout sendlrecvs[i] in the array sendrecv_data starts sendrecvdispls[i] bytes after the address given in sendrecv_data. The i-th memory block is sent to the i-th process. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing and incoming messages

  • sendrecvls – memory layouts of the data to send and to receive

  • sendrecvdispls – displacements of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(T *sendrecv_data, const layouts<T> &sendrecvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendrecv_data. The i-th memory block with the layout sendrecvls[i] in the array sendrecv_data starts at the address given in sendrecv_data. The i-th memory block is sent to the i-th process. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send-receive blocks. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the

Parameters:
  • sendrecv_data – pointer to continuous storage for incoming and outgoing messages

  • sendrecvls – memory layouts of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts senddispls[i] bytes after the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts recvdispls[i] bytes after the address given in recv_data. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(const T *send_data, const layouts<T> &sendls, T *recv_data, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts at the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts at the address given in recv_data. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send- or receive blocks. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T, typename F>
inline void reduce(F f, int root_rank, T &sendrecv_data) const#

Performs a reduction operation over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input data for the reduction operation, will hold the result of the reduction operation if rank equals root_rank

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T &send_data) const#

Performs a reduction operation over all processes, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input data for the reduction operation

template<typename T, typename F>
inline void reduce(F f, int root_rank, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input buffer for the reduction operation, will hold the results of the reduction operation if rank equals root_rank

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T *send_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation if rank equals root_rank

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation if rank equals root_rank, may be nullptr if rank does no equal to root_rank

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, T &sendrecv_data) const#

Performs a reduction operation over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input data for the reduction operation, will hold the result of the reduction operation if rank equals root_rank

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T &send_data) const#

Performs a reduction operation over all processes in a non-blocking manner, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input buffer for the reduction operation, will hold the results of the reduction operation if rank equals root_rank

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T *send_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in a non-blocking manner, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation if rank equals root_rank

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation if rank equals root_rank, may be nullptr if rank does no equal to root_rank

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void allreduce(F f, T &sendrecv_data) const#

Performs a reduction operation over all processes and broadcasts the result, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void allreduce(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void allreduce(F f, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes and broadcasts the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void allreduce(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iallreduce(F f, T &sendrecv_data) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result in non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void scan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void scan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void scan(F f, const T &send_data, T &recv_data) const#

Performs partial reduction operation (scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void scan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction (scan) operation over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, const T &send_data, T &recv_data) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void exscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void exscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void exscan(F f, const T &send_data, T &recv_data) const#

Performs partial reduction operation (exclusive scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void exscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iexscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, const T &send_data, T &recv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

inline inter_communicator spawn(int root_rank, int max_procs, const command_line &command) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • max_procs – number of processes to span

  • command – command and command-line options to the processes that are spawned

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn(int root_rank, int max_procs, const command_line &command, const mpl::info &i) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • max_procs – number of processes to span

  • command – command and command-line options to the processes that are spawned

  • i – info object telling the underlying MPI runtime how to spawn the new processes

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn(int root_rank) const#

Spawns new processes and establishes communication, non-root variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:

root_rank – the root process

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank, const command_lines &commands) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • commands – command and command-line options to the processes that are spawned

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank, const command_lines &commands, const mpl::infos &i) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • commands – command and command-line options to the processes that are spawned

  • i – list of info object telling the underlying MPI runtime how to spawn the new processes

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank) const#

Spawns new processes and establishes communication, non-root variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:

root_rank – the root process

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline MPI_Comm native_handle() const#

Get the underlying MPI handle of the communicator.

Note

This function returns a non-owning handle to the underlying MPI communicator, which may be useful when refactoring legacy MPI applications to MPL.

Warning

The handle must not be used to modify the MPI communicator that the handle points to. This method will be removed in a future version.

Returns:

MPI handle of the communicator

inline bool is_valid() const#

Checks if a communicator is valid, i.e., is not an empty communicator with no associated process.

Note

A default constructed communicator is a non valid communicator.

Returns:

true if communicator is valid

inline void abort(int err) const#

Aborts all processes associated to the communicator.

Note

Method provides just a “best attempt” to abort processes.

Parameters:

err – error code, becomes the return code of the main program

template<typename T>
inline void send(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking standard send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void send(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void send(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest isend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking standard send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest isend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest isend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest send_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking standard send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest send_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest send_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline int bsend_size(int number = 1) const#

Determines the message buffer size.

Template Parameters:

T – type of the data to send in a later buffered send operation, must meet the requirements as described in the Supported data types section

Parameters:

number – quantity of elements of type T to send in a single buffered message or in a series of buffered send operations

Returns:

message buffer size

template<typename T>
inline int bsend_size(const layout<T> &l, int number = 1) const#

Determines the message buffer size.

Template Parameters:

T – type of the data to send in a later buffered send operation, must meet the requirements as described in the Supported data types section

Parameters:
  • l – layout of the data

  • number – quantity of buffered send operations with the given data type and layout

Returns:

message buffer size

template<typename T>
inline void bsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a buffered send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void bsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void bsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest ibsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking buffered send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ibsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest ibsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest bsend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a buffered send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest bsend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest bsend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline void ssend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking synchronous send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void ssend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void ssend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest issend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking synchronous send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest issend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest issend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest ssend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking synchronous send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest ssend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest ssend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline void rsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking ready send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void rsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void rsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest irsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking ready send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest irsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest irsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest rsend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking ready send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest rsend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest rsend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline status_t recv(T &data, int source, tag_t t = tag_t{0}) const#

Receives a message with a single value.

Note

Receiving STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename T>
inline status_t recv(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values having a specific memory layout.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename iterT>
inline status_t recv(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values given by a pair of iterators.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename T>
inline irequest irecv(T &data, int source, tag_t t = tag_t{0}) const#

Receives a message with a single value via a non-blocking receive operation.

Note

Receiving STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing receive operation

template<typename T>
inline irequest irecv(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Receives a message with several values having a specific memory layout via a non-blocking receive operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing receive operation

template<typename iterT>
inline irequest irecv(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values given by a pair of iterators via a non-blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest recv_init(T &data, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a single value via a blocking receive operation.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest recv_init(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest recv_init(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a several values given by a pair of iterators via a blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending ing process

  • t – tag associated to this message

Returns:

persistent communication request

inline status_t probe(int source, tag_t t = tag_t{0}) const#

Blocking test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the pending message

inline std::optional<status_t> iprobe(int source, tag_t t = tag_t{0}) const#

Non-blocking test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the pending message if there is any pending message

inline mprobe_status mprobe(int source, tag_t t = tag_t{0}) const#

Blocking matched test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

message handle and status of the pending message

inline std::optional<mprobe_status> improbe(int source, tag_t t = tag_t{0}) const#

Blocking matched test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

message handle and status of the pending message if there is a pending message by the given source and with the given tag

template<typename T>
inline status_t mrecv(T &data, message_t &m) const#

Receives a message with a single value by a message handle.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename T>
inline status_t mrecv(T *data, const layout<T> &l, message_t &m) const#

Receives a message with a several values having a specific memory layout by a message handle.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename iterT>
inline status_t mrecv(iterT begin, iterT end, message_t &m) const#

Receives a message with a several values given by a pair of iterators by a message handle.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename T>
inline irequest imrecv(T &data, message_t &m) const#

Receives a message with a single value via a non-blocking receive operation by a message handle.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing receive operation

template<typename T>
inline irequest imrecv(T *data, const layout<T> &l, message_t &m) const#

Receives a message with several values having a specific memory layout via a non-blocking receive operation by a message handle.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing receive operation

template<typename iterT>
inline irequest imrecv(iterT begin, iterT end, message_t &m) const#

Receives a message with a several values given by a pair of iterators via a non-blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline status_t sendrecv(const T &send_data, int destination, tag_t send_tag, T &recv_data, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • recv_data – data to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv(const T *send_data, const layout<T> &sendl, int destination, tag_t send_tag, T *recv_data, const layout<T> &recvl, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename iterT1, typename iterT2>
inline status_t sendrecv(iterT1 begin_1, iterT1 end_1, int destination, tag_t send_tag, iterT2 begin_2, iterT2 end_2, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:
Parameters:
  • begin_1 – iterator pointing to the first data value to send

  • end_1 – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • begin_2 – iterator pointing to the first data value to receive

  • end_2 – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv_replace(T &data, int destination, tag_t send_tag, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – data to send, will hold the received data

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv_replace(T *data, const layout<T> &l, int destination, tag_t send_tag, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – data to send, will hold the received data

  • l – memory layout of the data to send and receive

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename iterT>
inline status_t sendrecv_replace(iterT begin, iterT end, int destination, tag_t send_tag, int source, tag_t recvtag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send and to receive

  • end – iterator pointing one element beyond the last data value to send and to receive

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recvtag – tag associated to the data to receive

Returns:

status of the receive operation

inline void barrier() const#

Blocks until all processes in the communicator have reached this method.

Note

This is a collective operation and must be called by all processes in the communicator.

inline irequest ibarrier() const#

Notifies the process that it has reached the barrier and returns immediately.

Note

This is a collective operation and must be called by all processes in the communicator.

Returns:

communication request

template<typename T>
inline void bcast(int root_rank, T &data) const#

Broadcasts a message from a process to all other processes.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

template<typename T>
inline void bcast(int root_rank, T *data, const layout<T> &l) const#

Broadcasts a message from a process to all other processes.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

  • l – memory layout of the data to send/receive

template<typename T>
inline irequest ibcast(int root_rank, T &data) const#

Broadcasts a message from a process to all other processes in a non-blocking manner.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ibcast(int root_rank, T *data, const layout<T> &l) const#

Broadcasts a message from a process to all other processes in a non-blocking manner.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

  • l – memory layout of the data to send/receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void gather(int root_rank, const T &send_data, T *recv_data) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

template<typename T>
inline void gather(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvl – memory layout of the data to receive

template<typename T>
inline void gather(int root_rank, const T &send_data) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

template<typename T>
inline void gather(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

template<typename T>
inline irequest igather(int root_rank, const T &send_data, T *recv_data) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T &send_data) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

  • recvdispls – displacements of the data to receive by the root rank

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

  • recvdispls – displacements of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline void allgather(const T &send_data, T *recv_data) const#

Gather messages from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages

template<typename T>
inline void allgather(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

template<typename T>
inline irequest iallgather(const T &send_data, T *recv_data) const#

Gather messages from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iallgather(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void allgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void allgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline irequest iallgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iallgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void scatter(int root_rank, const T *send_data, T &recv_data) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • recv_data – data to receive

template<typename T>
inline void scatter(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendl – memory layout of the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

template<typename T>
inline void scatter(int root_rank, T &recv_data) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

template<typename T>
inline void scatter(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

template<typename T>
inline irequest iscatter(int root_rank, const T *send_data, T &recv_data) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • recv_data – data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendl – memory layout of the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, T &recv_data) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void scatterv(int root_rank, const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send by the root rank

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline void scatterv(int root_rank, const T *send_data, const layouts<T> &sendls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline void scatterv(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline irequest iscatterv(int root_rank, const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send by the root rank

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatterv(int root_rank, const T *send_data, const layouts<T> &sendls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatterv(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T, typename F>
inline void reduce_scatter_block(F f, const T *send_data, T &recv_data) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the size of the communicator

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void reduce_scatter_block(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &recvcount) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the size of the communicator times the number of elements given by the layout parameter

  • recv_data – will hold the results of the reduction operation

  • recvcount – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce_scatter_block(F f, const T *send_data, T &recv_data) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation, number of elements in buffer send_data must equal the size of the communicator

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce_scatter_block(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &recvcount) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation, number of elements in buffer send_data must equal the size of the communicator times the number of elements given by the layout parameter

  • recv_data – will hold the results of the reduction operation

  • recvcount – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void reduce_scatter(F f, const T *send_data, T *recv_data, const contiguous_layouts<T> &recvcounts) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the sum of the number of elements given by the collection of layout parameters

  • recv_data – will hold the results of the reduction operation

  • recvcounts – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce_scatter(F f, const T *send_data, T *recv_data, contiguous_layouts<T> &recvcounts) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the sum of the number of elements given by the collection of layout parameters

  • recv_data – will hold the results of the reduction operation

  • recvcounts – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

Public Static Attributes

static constexpr merge_order_type order_low = merge_order_type::order_low#

indicates that when merging the local and the remote groups of an inter-communicator put processes of this group before processes that belong to the other group

static constexpr merge_order_type order_high = merge_order_type::order_high#

indicates that when merging the local and the remote groups of an inter-communicator put processes of this group after processes that belong to the other group

static constexpr equality_type identical = equality_type::identical#

indicates that communicators are identical, i.e., communicators represent the same communication context

static constexpr equality_type congruent = equality_type::congruent#

indicates that communicators are identical, i.e., communicators have same the members in same rank order but different context

static constexpr equality_type similar = equality_type::similar#

indicates that communicators are similar, i.e., communicators have same tha members in different rank order

static constexpr equality_type unequal = equality_type::unequal#

indicates that communicators are unequal, i.e., communicators have different sets of members

static constexpr comm_collective_tag comm_collective = {}#

Indicates the creation of a new communicator by an operation that is collective for all processes in the given communicator.

static constexpr group_collective_tag group_collective = {}#

Indicates the creation of a new communicator by an operation that is collective for all processes in the given group.

static constexpr split_tag split = {}#

Indicates the creation of a new communicator by spitting an existing communicator into disjoint subgroups.

static constexpr split_shared_memory_tag split_shared_memory = {}#

Indicates the creation of a new communicator by spitting an existing communicator into disjoint subgroups each of which can create a shared memory region.

class edge_set : private std::set<std::tuple<int, int>>#

Set of edges, pairs of nodes represented by non-negative integers.

Public Types

using value_type = typename base::value_type#
using reference = typename base::reference#
using const_reference = typename base::const_reference#
using iterator = typename base::iterator#
using const_iterator = typename base::const_iterator#

Public Functions

edge_set() = default#

Creates an empty set of edges.

inline edge_set(std::initializer_list<value_type> init)#

Creates a set of edges given by the list.

Parameters:

init – set of edges

inline int size() const#

Determines the number edges.

Returns:

number of edges in the edge set

inline void add(const value_type &edge)#

Add an additional edge to the set.

Parameters:

edge – tuple of two non-negative integers

class node_list : private std::vector<int>#

Set of nodes represented by integers.

Public Types

using value_type = typename base::value_type#
using reference = typename base::reference#
using const_reference = typename base::const_reference#
using iterator = typename base::iterator#
using const_iterator = typename base::const_iterator#

Public Functions

node_list() = default#

Creates an empty node list.

inline explicit node_list(int nodes)#

Creates non-empty list of nodes.

Parameters:

nodes – number of elements of the node list

inline node_list(std::initializer_list<int> init)#

Creates non-empty list of nodes with nodes given by the list.

Parameters:

init – vector components

inline int size() const#

Determines the number of nodes.

Returns:

number of nodes in the list

inline reference operator[](int index)#

Access a list element.

Parameters:

index – non-negative index to the list element

inline const_reference operator[](int index) const#

Access a list element.

Parameters:

index – non-negative index to the list element

inline void add(int node)#

Add an additional element to the end of the node list.

Parameters:

node – the node that is added

Friends

friend class graph_communicator

Distributed graph communicators#

class distributed_graph_communicator : public topology_communicator#

Communicator with general graph topology.

Public Types

enum class merge_order_type#

Specifies the process order when merging the local and the remote groups of an inter-communicator into a communicator.

Values:

enumerator order_low#

when merging the local and the remote groups of an inter-communicator put processes of this group before processes that belong to the other group

enumerator order_high#

when merging the local and the remote groups of an inter-communicator put processes of this group after processes that belong to the other group

enum class equality_type#

Equality types for communicator comparison.

Values:

enumerator identical#

communicators are identical, i.e., communicators represent the same communication context

enumerator congruent#

communicators are identical, i.e., communicators have the same members in same rank order but a different context

enumerator similar#

communicators are similar, i.e., communicators have same the members in different rank order

enumerator unequal#

communicators are unequal, i.e., communicators have different sets of members

Public Functions

distributed_graph_communicator() = default#

Creates an empty communicator with no associated process.

inline distributed_graph_communicator(const distributed_graph_communicator &other)#

Creates a new communicator which is equivalent to an existing one.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other. Communicators should not be copied unless a new independent communicator is wanted. Communicators should be passed via references to functions to avoid unnecessary copying.

Parameters:

other – the other communicator to copy from

inline distributed_graph_communicator(distributed_graph_communicator &&other) noexcept#

Move-constructs a communicator.

Parameters:

other – the other communicator to move from

inline explicit distributed_graph_communicator(const communicator &other, const neighbours_set &sources, const neighbours_set &destinations, bool reorder = true)#

Creates a new communicator with graph process topology.

Note

This is a collective operation that needs to be carried out by all processes of the communicator. The rank of the calling process and source ranks define a set of source-edges, and the rank of the calling process and destination ranks define a set of destination-edges. The combination of all source-edges must equal the combination of all destination-edges in this collective operation. Edge weights given in the sources and destinations arguments may affect the rank ordering but the specific meaning is determined by the underling MPI implementation.

Parameters:
  • other – communicator containing the processes to use in the creation of the new communicator

  • sources – ranks and associated weights of processes for which the calling process is a destination

  • destinations – ranks and associated weights of processes for which the calling process is a source

  • reorder – indicates if reordering is permitted, if false each process will have the same rank in the new communicator as in the old one

inline distributed_graph_communicator &operator=(const distributed_graph_communicator &other) noexcept#

Copy-assigns and creates a new communicator with graph process topology which is equivalent to an existing one.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other. Communicators should not be copied unless a new independent communicator is wanted. Communicators should be passed via references to functions to avoid unnecessary copying.

Parameters:

other – the other communicator to copy from

inline distributed_graph_communicator &operator=(distributed_graph_communicator &&other) noexcept#

Move-assigns a communicator.

Note

This is a collective operation that needs to be carried out by all processes of the communicator other.

Parameters:

other – the other communicator to move from

inline std::tuple<int, int> in_out_degree() const#

Determines the number of edges into and out of this process.

Returns:

in- and out-degree

inline int in_degree() const#

Determines the number of edges into this process.

Returns:

in-degree

inline int out_degree() const#

Determines the number of edges out of this process.

Returns:

out-degree

inline neighbours_set in_neighbors() const#

Determines the ranks of the processes for which the calling process is a destination.

Returns:

in-neighbours with associated weights

inline neighbours_set out_neighbors() const#

Determines the ranks of the processes for which the calling process is a source.

Returns:

out-neighbours with associated weights

template<typename T>
inline void neighbor_allgather(const T &senddata, T *recvdata) const#

Gather messages from all neighboring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • recvdata – pointer to continuous storage for incoming messages

template<typename T>
inline void neighbor_allgather(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Gather messages from all neighboring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

template<typename T>
inline mpl::irequest ineighbor_allgather(const T &senddata, T *recvdata) const#

Gather messages from all neighboring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • recvdata – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_allgather(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Gather messages from all neighboring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send to all neighbours

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void neighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all neighbouring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void neighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all neighbouring processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline mpl::irequest ineighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_allgatherv(const T *senddata, const layout<T> &sendl, T *recvdata, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – data to send

  • sendl – memory layout of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void neighbor_alltoall(const T *senddata, T *recvdata) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes.

Each process in the communicator sends one element of type T to each neighbouring process and receives one element of type T from each neighbouring process. The i-th element in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th element in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • recvdata – pointer to continuous storage for incoming messages

template<typename T>
inline void neighbor_alltoall(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes.

Each process in the communicator sends elements of type T to each neighbouring process and receives elements of type T from each neighbouring process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th memory block with the layout recvl in the array recvdata was received from the i-th neigbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

template<typename T>
inline mpl::irequest ineighbor_alltoall(const T *senddata, T *recvdata) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends one element of type T to each neighbouring process and receives one element of type T from each neighbouring process. The i-th element in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th element in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • recvdata – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_alltoall(const T *senddata, const layout<T> &sendl, T *recvdata, const layout<T> &recvl) const#

Sends messages to all neighbouring processes and receives messages from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each neighbouring process and receives elements of type T from each neighbouring process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array senddata is sent to the i-th neighbour. When the function has finished, the i-th memory block with the layout recvl in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void neighbor_alltoallv(const T *senddata, const layouts<T> &sendls, const displacements &senddispls, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes.

Each process in the communicator sends elements of type T to each neighbor and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts senddispls[i] bytes after the address given in senddata. The i-th memory block is sent to the i-th neighbor. The i-th memory block with the layout recvls[i] in the array recvdata starts recvdispls[i] bytes after the address given in recvdata. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbor.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void neighbor_alltoallv(const T *senddata, const layouts<T> &sendls, T *recvdata, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes.

Each process in the communicator sends elements of type T to each neighbour and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts at the address given in senddata. The i-th memory block is sent to the i-th neighbour. The i-th memory block with the layout recvls[i] in the array recvdata starts at the address given in recvdata. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send blocks or receive blocks. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline mpl::irequest ineighbor_alltoallv(const T *senddata, const layouts<T> &sendls, const displacements &senddispls, T *recvdata, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each neighbor and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts senddispls[i] bytes after the address given in senddata. The i-th memory block is sent to the i-th neighbor. The i-th memory block with the layout recvls[i] in the array recvdata starts recvdispls[i] bytes after the address given in recvdata. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbor.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline mpl::irequest ineighbor_alltoallv(const T *senddata, const layouts<T> &sendls, T *recvdata, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all neighbouring processes and receives messages with a variable amount of data from all neighbouring processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each neighbour and receives elements of type T from each neighbour. Send- and receive-data are stored in consecutive blocks of variable size in the buffers senddata and recvdata, respectively. The i-th memory block with the layout sendls[i] in the array senddata starts at the address given in senddata. The i-th memory block is sent to the i-th neighbour. The i-th memory block with the layout recvls[i] in the array recvdata starts at the address given in recvdata. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send blocks or receive blocks. When the function has finished, the i-th memory block in the array recvdata was received from the i-th neighbour.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • senddata – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recvdata – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

inline int size() const#

Determines the total number of processes in a communicator.

Returns:

number of processes

inline int rank() const#

Determines the rank within a communicator.

Returns:

the rank of the calling process in the communicator

inline void info(const mpl::info &i) const#

Updates the hints of the communicator.

Parameters:

i – info object with new hints

inline mpl::info info() const#

Get the the hints of the communicator.

Returns:

hints of the communicator

inline bool operator==(const communicator &other) const#

Tests for identity of communicators.

Parameters:

other – communicator to compare with

Returns:

true if identical

inline bool operator!=(const communicator &other) const#

Tests for identity of communicators.

Parameters:

other – communicator to compare with

Returns:

true if not identical

inline equality_type compare(const communicator &other) const#

Compares to another communicator.

Parameters:

other – communicator to compare with

Returns:

equality type

template<typename T>
inline void alltoall(T *sendrecv_data) const#

Sends messages to all processes and receives messages from all processes, in-place version.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array sendrecv_data is sent to the i-th process. When the function has finished, the i-th element in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:

sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

template<typename T>
inline void alltoall(T *sendrecv_data, const layout<T> &sendrecvl) const#

Sends messages to all processes and receives messages from all processes, in-place version.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendrecvl. The i-th memory block with the layout sendrecvl in the array sendrecv_data is sent to the i-th process. When the function has finished, the i-th memory block with the layout sendrecvl in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

  • sendrecvl – memory layouts of the data to send and to receive

template<typename T>
inline void alltoall(const T *send_data, T *recv_data) const#

Sends messages to all processes and receives messages from all processes.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array send_data is sent to the i-th process. When the function has finished, the i-th element in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • recv_data – pointer to continuous storage for incoming messages

template<typename T>
inline void alltoall(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Sends messages to all processes and receives messages from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array send_data is sent to the i-th process. When the function has finished, the i-th memory block with the layout recvl in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

template<typename T>
inline irequest ialltoall(T *sendrecv_data) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner, in-place version.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array sendrecv_data is sent to the i-th process. When the message transfer has finished, the i-th element in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:

sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(T *sendrecv_data, const layout<T> &sendrecvl) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner, in-place version.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendrecvl. The i-th memory block with the layout sendrecvl in the array sendrecv_data is sent to the i-th process. When the message transfer has finished, the i-th memory block with the layout sendrecvl in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing messages and for incoming messages

  • sendrecvl – memory layouts of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(const T *send_data, T *recv_data) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array send_data is sent to the i-th process. When the message transfer has finished, the i-th element in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • recv_data – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array send_data is sent to the i-th process. When the message transfer has finished, the i-th memory block with the layout recvl in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void alltoallv(T *sendrecv_data, const layouts<T> &sendrecvls, const displacements &sendrecvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendecvdata. The i-th memory block with the layout sendlrecvs[i] in the array sendrecv_data starts sendrecvdispls[i] bytes after the address given in sendrecv_data. The i-th memory block is sent to the i-th process. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing and incoming messages

  • sendrecvls – memory layouts of the data to send and to receive

  • sendrecvdispls – displacements of the data to send and to receive

template<typename T>
inline void alltoallv(T *sendrecv_data, const layouts<T> &sendrecvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendrecv_data. The i-th memory block with the layout sendrecvls[i] in the array sendrecv_data starts at the address given in sendrecv_data. The i-th memory block is sent to the i-th process. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send-receive blocks. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for incoming and outgoing messages

  • sendrecvls – memory layouts of the data to send and to receive

template<typename T>
inline void alltoallv(const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts senddispls[i] bytes after the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts recvdispls[i] bytes after the address given in recv_data. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void alltoallv(const T *send_data, const layouts<T> &sendls, T *recv_data, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts at the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts at the address given in recv_data. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send- or receive blocks. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline irequest ialltoallv(T *sendrecv_data, const layouts<T> &sendrecvls, const displacements &sendrecvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendecvdata. The i-th memory block with the layout sendlrecvs[i] in the array sendrecv_data starts sendrecvdispls[i] bytes after the address given in sendrecv_data. The i-th memory block is sent to the i-th process. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • sendrecv_data – pointer to continuous storage for outgoing and incoming messages

  • sendrecvls – memory layouts of the data to send and to receive

  • sendrecvdispls – displacements of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(T *sendrecv_data, const layouts<T> &sendrecvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner, in-place variant.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffer sendrecv_data. The i-th memory block with the layout sendrecvls[i] in the array sendrecv_data starts at the address given in sendrecv_data. The i-th memory block is sent to the i-th process. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send-receive blocks. When the function has finished, the i-th memory block in the array sendrecv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the

Parameters:
  • sendrecv_data – pointer to continuous storage for incoming and outgoing messages

  • sendrecvls – memory layouts of the data to send and to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts senddispls[i] bytes after the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts recvdispls[i] bytes after the address given in recv_data. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(const T *send_data, const layouts<T> &sendls, T *recv_data, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts at the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts at the address given in recv_data. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send- or receive blocks. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T, typename F>
inline void reduce(F f, int root_rank, T &sendrecv_data) const#

Performs a reduction operation over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input data for the reduction operation, will hold the result of the reduction operation if rank equals root_rank

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T &send_data) const#

Performs a reduction operation over all processes, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input data for the reduction operation

template<typename T, typename F>
inline void reduce(F f, int root_rank, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input buffer for the reduction operation, will hold the results of the reduction operation if rank equals root_rank

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T *send_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation if rank equals root_rank

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation if rank equals root_rank, may be nullptr if rank does no equal to root_rank

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, T &sendrecv_data) const#

Performs a reduction operation over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input data for the reduction operation, will hold the result of the reduction operation if rank equals root_rank

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T &send_data) const#

Performs a reduction operation over all processes in a non-blocking manner, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • sendrecv_data – input buffer for the reduction operation, will hold the results of the reduction operation if rank equals root_rank

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T *send_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in a non-blocking manner, non-root in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result, must be different from the rank of the calling process

  • send_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation if rank equals root_rank

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation if rank equals root_rank, may be nullptr if rank does no equal to root_rank

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void allreduce(F f, T &sendrecv_data) const#

Performs a reduction operation over all processes and broadcasts the result, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void allreduce(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void allreduce(F f, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes and broadcasts the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void allreduce(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iallreduce(F f, T &sendrecv_data) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result in non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void scan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void scan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void scan(F f, const T &send_data, T &recv_data) const#

Performs partial reduction operation (scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void scan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction (scan) operation over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, const T &send_data, T &recv_data) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void exscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

template<typename T, typename F>
inline void exscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline void exscan(F f, const T &send_data, T &recv_data) const#

Performs partial reduction operation (exclusive scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void exscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iexscan(F f, T &sendrecv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input data for the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, T *sendrecv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner, in-place variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • sendrecv_data – input buffer for the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, const T &send_data, T &recv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

inline inter_communicator spawn(int root_rank, int max_procs, const command_line &command) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • max_procs – number of processes to span

  • command – command and command-line options to the processes that are spawned

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn(int root_rank, int max_procs, const command_line &command, const mpl::info &i) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • max_procs – number of processes to span

  • command – command and command-line options to the processes that are spawned

  • i – info object telling the underlying MPI runtime how to spawn the new processes

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn(int root_rank) const#

Spawns new processes and establishes communication, non-root variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:

root_rank – the root process

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank, const command_lines &commands) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • commands – command and command-line options to the processes that are spawned

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank, const command_lines &commands, const mpl::infos &i) const#

Spawns new processes and establishes communication.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:
  • root_rank – the root process, following arguments are ignored on non-root ranks

  • commands – command and command-line options to the processes that are spawned

  • i – list of info object telling the underlying MPI runtime how to spawn the new processes

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline inter_communicator spawn_multiple(int root_rank) const#

Spawns new processes and establishes communication, non-root variant.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Parameters:

root_rank – the root process

Returns:

inter-communicator that establishes a communication channel between the processes of this communicator and the new spawned processes

inline MPI_Comm native_handle() const#

Get the underlying MPI handle of the communicator.

Note

This function returns a non-owning handle to the underlying MPI communicator, which may be useful when refactoring legacy MPI applications to MPL.

Warning

The handle must not be used to modify the MPI communicator that the handle points to. This method will be removed in a future version.

Returns:

MPI handle of the communicator

inline bool is_valid() const#

Checks if a communicator is valid, i.e., is not an empty communicator with no associated process.

Note

A default constructed communicator is a non valid communicator.

Returns:

true if communicator is valid

inline void abort(int err) const#

Aborts all processes associated to the communicator.

Note

Method provides just a “best attempt” to abort processes.

Parameters:

err – error code, becomes the return code of the main program

template<typename T>
inline void send(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking standard send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void send(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void send(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest isend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking standard send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest isend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest isend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest send_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking standard send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest send_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest send_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline int bsend_size(int number = 1) const#

Determines the message buffer size.

Template Parameters:

T – type of the data to send in a later buffered send operation, must meet the requirements as described in the Supported data types section

Parameters:

number – quantity of elements of type T to send in a single buffered message or in a series of buffered send operations

Returns:

message buffer size

template<typename T>
inline int bsend_size(const layout<T> &l, int number = 1) const#

Determines the message buffer size.

Template Parameters:

T – type of the data to send in a later buffered send operation, must meet the requirements as described in the Supported data types section

Parameters:
  • l – layout of the data

  • number – quantity of buffered send operations with the given data type and layout

Returns:

message buffer size

template<typename T>
inline void bsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a buffered send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void bsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void bsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest ibsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking buffered send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ibsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest ibsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest bsend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a buffered send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest bsend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest bsend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline void ssend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking synchronous send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void ssend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void ssend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest issend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking synchronous send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest issend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest issend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest ssend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking synchronous send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest ssend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest ssend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline void rsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking ready send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void rsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void rsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest irsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking ready send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest irsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest irsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest rsend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking ready send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest rsend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest rsend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline status_t recv(T &data, int source, tag_t t = tag_t{0}) const#

Receives a message with a single value.

Note

Receiving STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename T>
inline status_t recv(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values having a specific memory layout.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename iterT>
inline status_t recv(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values given by a pair of iterators.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename T>
inline irequest irecv(T &data, int source, tag_t t = tag_t{0}) const#

Receives a message with a single value via a non-blocking receive operation.

Note

Receiving STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing receive operation

template<typename T>
inline irequest irecv(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Receives a message with several values having a specific memory layout via a non-blocking receive operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing receive operation

template<typename iterT>
inline irequest irecv(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values given by a pair of iterators via a non-blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest recv_init(T &data, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a single value via a blocking receive operation.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest recv_init(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest recv_init(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a several values given by a pair of iterators via a blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending ing process

  • t – tag associated to this message

Returns:

persistent communication request

inline status_t probe(int source, tag_t t = tag_t{0}) const#

Blocking test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the pending message

inline std::optional<status_t> iprobe(int source, tag_t t = tag_t{0}) const#

Non-blocking test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the pending message if there is any pending message

inline mprobe_status mprobe(int source, tag_t t = tag_t{0}) const#

Blocking matched test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

message handle and status of the pending message

inline std::optional<mprobe_status> improbe(int source, tag_t t = tag_t{0}) const#

Blocking matched test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

message handle and status of the pending message if there is a pending message by the given source and with the given tag

template<typename T>
inline status_t mrecv(T &data, message_t &m) const#

Receives a message with a single value by a message handle.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename T>
inline status_t mrecv(T *data, const layout<T> &l, message_t &m) const#

Receives a message with a several values having a specific memory layout by a message handle.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename iterT>
inline status_t mrecv(iterT begin, iterT end, message_t &m) const#

Receives a message with a several values given by a pair of iterators by a message handle.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename T>
inline irequest imrecv(T &data, message_t &m) const#

Receives a message with a single value via a non-blocking receive operation by a message handle.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing receive operation

template<typename T>
inline irequest imrecv(T *data, const layout<T> &l, message_t &m) const#

Receives a message with several values having a specific memory layout via a non-blocking receive operation by a message handle.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing receive operation

template<typename iterT>
inline irequest imrecv(iterT begin, iterT end, message_t &m) const#

Receives a message with a several values given by a pair of iterators via a non-blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline status_t sendrecv(const T &send_data, int destination, tag_t send_tag, T &recv_data, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • recv_data – data to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv(const T *send_data, const layout<T> &sendl, int destination, tag_t send_tag, T *recv_data, const layout<T> &recvl, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename iterT1, typename iterT2>
inline status_t sendrecv(iterT1 begin_1, iterT1 end_1, int destination, tag_t send_tag, iterT2 begin_2, iterT2 end_2, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:
Parameters:
  • begin_1 – iterator pointing to the first data value to send

  • end_1 – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • begin_2 – iterator pointing to the first data value to receive

  • end_2 – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv_replace(T &data, int destination, tag_t send_tag, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – data to send, will hold the received data

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv_replace(T *data, const layout<T> &l, int destination, tag_t send_tag, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – data to send, will hold the received data

  • l – memory layout of the data to send and receive

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename iterT>
inline status_t sendrecv_replace(iterT begin, iterT end, int destination, tag_t send_tag, int source, tag_t recvtag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send and to receive

  • end – iterator pointing one element beyond the last data value to send and to receive

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recvtag – tag associated to the data to receive

Returns:

status of the receive operation

inline void barrier() const#

Blocks until all processes in the communicator have reached this method.

Note

This is a collective operation and must be called by all processes in the communicator.

inline irequest ibarrier() const#

Notifies the process that it has reached the barrier and returns immediately.

Note

This is a collective operation and must be called by all processes in the communicator.

Returns:

communication request

template<typename T>
inline void bcast(int root_rank, T &data) const#

Broadcasts a message from a process to all other processes.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

template<typename T>
inline void bcast(int root_rank, T *data, const layout<T> &l) const#

Broadcasts a message from a process to all other processes.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

  • l – memory layout of the data to send/receive

template<typename T>
inline irequest ibcast(int root_rank, T &data) const#

Broadcasts a message from a process to all other processes in a non-blocking manner.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ibcast(int root_rank, T *data, const layout<T> &l) const#

Broadcasts a message from a process to all other processes in a non-blocking manner.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

  • l – memory layout of the data to send/receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void gather(int root_rank, const T &send_data, T *recv_data) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

template<typename T>
inline void gather(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvl – memory layout of the data to receive

template<typename T>
inline void gather(int root_rank, const T &send_data) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

template<typename T>
inline void gather(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

template<typename T>
inline irequest igather(int root_rank, const T &send_data, T *recv_data) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T &send_data) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

  • recvdispls – displacements of the data to receive by the root rank

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

  • recvdispls – displacements of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline void allgather(const T &send_data, T *recv_data) const#

Gather messages from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages

template<typename T>
inline void allgather(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

template<typename T>
inline irequest iallgather(const T &send_data, T *recv_data) const#

Gather messages from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iallgather(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void allgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void allgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline irequest iallgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iallgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void scatter(int root_rank, const T *send_data, T &recv_data) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • recv_data – data to receive

template<typename T>
inline void scatter(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendl – memory layout of the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

template<typename T>
inline void scatter(int root_rank, T &recv_data) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

template<typename T>
inline void scatter(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

template<typename T>
inline irequest iscatter(int root_rank, const T *send_data, T &recv_data) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • recv_data – data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendl – memory layout of the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, T &recv_data) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void scatterv(int root_rank, const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send by the root rank

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline void scatterv(int root_rank, const T *send_data, const layouts<T> &sendls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline void scatterv(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline irequest iscatterv(int root_rank, const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send by the root rank

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatterv(int root_rank, const T *send_data, const layouts<T> &sendls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatterv(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T, typename F>
inline void reduce_scatter_block(F f, const T *send_data, T &recv_data) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the size of the communicator

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void reduce_scatter_block(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &recvcount) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the size of the communicator times the number of elements given by the layout parameter

  • recv_data – will hold the results of the reduction operation

  • recvcount – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce_scatter_block(F f, const T *send_data, T &recv_data) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation, number of elements in buffer send_data must equal the size of the communicator

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce_scatter_block(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &recvcount) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation, number of elements in buffer send_data must equal the size of the communicator times the number of elements given by the layout parameter

  • recv_data – will hold the results of the reduction operation

  • recvcount – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void reduce_scatter(F f, const T *send_data, T *recv_data, const contiguous_layouts<T> &recvcounts) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the sum of the number of elements given by the collection of layout parameters

  • recv_data – will hold the results of the reduction operation

  • recvcounts – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce_scatter(F f, const T *send_data, T *recv_data, contiguous_layouts<T> &recvcounts) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the sum of the number of elements given by the collection of layout parameters

  • recv_data – will hold the results of the reduction operation

  • recvcounts – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

Public Static Attributes

static constexpr merge_order_type order_low = merge_order_type::order_low#

indicates that when merging the local and the remote groups of an inter-communicator put processes of this group before processes that belong to the other group

static constexpr merge_order_type order_high = merge_order_type::order_high#

indicates that when merging the local and the remote groups of an inter-communicator put processes of this group after processes that belong to the other group

static constexpr equality_type identical = equality_type::identical#

indicates that communicators are identical, i.e., communicators represent the same communication context

static constexpr equality_type congruent = equality_type::congruent#

indicates that communicators are identical, i.e., communicators have same the members in same rank order but different context

static constexpr equality_type similar = equality_type::similar#

indicates that communicators are similar, i.e., communicators have same tha members in different rank order

static constexpr equality_type unequal = equality_type::unequal#

indicates that communicators are unequal, i.e., communicators have different sets of members

static constexpr comm_collective_tag comm_collective = {}#

Indicates the creation of a new communicator by an operation that is collective for all processes in the given communicator.

static constexpr group_collective_tag group_collective = {}#

Indicates the creation of a new communicator by an operation that is collective for all processes in the given group.

static constexpr split_tag split = {}#

Indicates the creation of a new communicator by spitting an existing communicator into disjoint subgroups.

static constexpr split_shared_memory_tag split_shared_memory = {}#

Indicates the creation of a new communicator by spitting an existing communicator into disjoint subgroups each of which can create a shared memory region.

class neighbours_set : private std::set<rank_weight_pair, less_weights>#

Set of edges, pairs of nodes represented by non-negative integers.

Public Types

using value_type = typename base::value_type#
using reference = typename base::reference#
using const_reference = typename base::const_reference#
using iterator = typename base::iterator#
using const_iterator = typename base::const_iterator#

Public Functions

neighbours_set() = default#

Creates an empty set of edges.

inline neighbours_set(std::initializer_list<value_type> init)#

Creates a set of edges given by the list.

Parameters:

init – set of edges

inline int size() const#

Determines the number edges.

Returns:

number of edges in the edge set

inline void add(const value_type &edge)#

Add an additional edge to the set.

Parameters:

edge – tuple of two non-negative integers

class rank_weight_pair#

Pair of rank and weight.

Public Functions

inline rank_weight_pair(int rank, int weight = 0)#

Creates a rank-weight pair.

Public Members

int rank = {0}#
int weight = {0}#

Inter-communicators#

class inter_communicator : public base_communicator#

Specifies the communication context for a communication operation between two non-overlapping groups.

Public Types

enum class equality_type#

Equality types for inter-communicator comparison.

Values:

enumerator identical#

inter-communicators are identical, i.e., inter-communicators represent the same inter-communication context with the identical local and remote groups

enumerator congruent#

inter-communicators are identical, i.e., inter-communicators have local and remote groups with the same members in same rank order but a different context

enumerator similar#

inter-communicators are similar, i.e., inter-communicators have local and remote groups with the same members in different rank order

enumerator unequal#

inter-communicators are unequal, i.e., inter-communicators have different local and remote groups

Public Functions

inline explicit inter_communicator(const communicator &local_communicator, int local_leader, const communicator &peer_communicator, int remote_leader, tag_t t = tag_t{0})#

Creates a new inter-communicator from two existing communicators.

Note

It is a collective operation over the union of the processes with the local communicator and the peer communicator.

Parameters:
  • local_communicator – communicator that contains the local group of the new inter-communicator

  • local_leader – rank of the local group leader within the communicator local_communicator

  • peer_communicator – peer communicator to which the local and the remote leaders belong

  • remote_leader – rank of the remote group leader within the peer communicator

  • t – tag associated to this operation

inline inter_communicator(const inter_communicator &other)#

Creates a new inter-communicator which is equivalent to an existing one.

Note

This is a collective operation that needs to be carried out by all local and remote processes of the inter-communicator other. Inter-communicators should not be copied unless a new independent communicator is wanted. Inter-Communicators should be passed via references to functions to avoid unnecessary copying.

Parameters:

other – the other inter-communicator to copy from

inline inter_communicator(inter_communicator &&other) noexcept#

Move-constructs an inter-communicator.

Parameters:

other – the other inter-communicator to move from

inline inter_communicator &operator=(const inter_communicator &other) noexcept#

Copy-assigns and creates a new inter-communicator which is equivalent to an existing one.

Note

This is a collective operation that needs to be carried out by all local and remote processes of the communicator other. Inter-communicators should not be copied unless a new independent inter-communicator is wanted. Inter-communicators should be passed via references to functions to avoid unnecessary copying.

Parameters:

other – the other inter-communicator to copy from

Returns:

this inter-communicator

inline inter_communicator &operator=(inter_communicator &&other) noexcept#

Move-assigns an inter-communicator.

Note

This is a collective operation that needs to be carried out by all processes local and remote processes of the inter-communicator other.

Parameters:

other – the other inter-communicator to move from

Returns:

this communicator

inline int size() const#

Determines the total number of processes in the local group of an inter-communicator.

Returns:

number of processes

inline int rank() const#

Determines the rank within the local group of an inter-communicator.

Returns:

the rank of the calling process in the inter-communicator

inline int remote_size() const#

Determines the total number of processes in the remote group of an inter-communicator.

Returns:

number of processes

inline bool operator==(const communicator &other) const#

Tests for identity of inter-communicators.

Parameters:

other – inter-communicator to compare with

Returns:

true if identical

inline bool operator!=(const communicator &other) const#

Tests for identity of inter-communicators.

Parameters:

other – inter-communicator to compare with

Returns:

true if not identical

inline equality_type compare(const communicator &other) const#

Compares to another inter-communicator.

Parameters:

other – inter-communicator to compare with

Returns:

equality type

inline MPI_Comm native_handle() const#

Get the underlying MPI handle of the communicator.

Note

This function returns a non-owning handle to the underlying MPI communicator, which may be useful when refactoring legacy MPI applications to MPL.

Warning

The handle must not be used to modify the MPI communicator that the handle points to. This method will be removed in a future version.

Returns:

MPI handle of the communicator

inline bool is_valid() const#

Checks if a communicator is valid, i.e., is not an empty communicator with no associated process.

Note

A default constructed communicator is a non valid communicator.

Returns:

true if communicator is valid

inline void abort(int err) const#

Aborts all processes associated to the communicator.

Note

Method provides just a “best attempt” to abort processes.

Parameters:

err – error code, becomes the return code of the main program

template<typename T>
inline void send(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking standard send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void send(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void send(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest isend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking standard send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest isend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest isend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest send_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking standard send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest send_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest send_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking standard send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline int bsend_size(int number = 1) const#

Determines the message buffer size.

Template Parameters:

T – type of the data to send in a later buffered send operation, must meet the requirements as described in the Supported data types section

Parameters:

number – quantity of elements of type T to send in a single buffered message or in a series of buffered send operations

Returns:

message buffer size

template<typename T>
inline int bsend_size(const layout<T> &l, int number = 1) const#

Determines the message buffer size.

Template Parameters:

T – type of the data to send in a later buffered send operation, must meet the requirements as described in the Supported data types section

Parameters:
  • l – layout of the data

  • number – quantity of buffered send operations with the given data type and layout

Returns:

message buffer size

template<typename T>
inline void bsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a buffered send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void bsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void bsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest ibsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking buffered send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ibsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest ibsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest bsend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a buffered send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest bsend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a buffered send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest bsend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a buffered send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline void ssend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking synchronous send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void ssend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void ssend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest issend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking synchronous send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest issend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest issend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest ssend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking synchronous send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest ssend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking synchronous send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest ssend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking synchronous send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline void rsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a blocking ready send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline void rsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values having a specific memory layout via a blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename iterT>
inline void rsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

template<typename T>
inline irequest irsend(const T &data, int destination, tag_t t = tag_t{0}) const#

Sends a message with a single value via a non-blocking ready send operation.

Note

Sending STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest irsend(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Sends a message with several values having a specific memory layout via a non-blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename iterT>
inline irequest irsend(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Sends a message with a several values given by a pair of iterators via a non-blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest rsend_init(const T &data, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a single value via a blocking ready send operation.

Note

Sending STL containers is not supported.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest rsend_init(const T *data, const layout<T> &l, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values having a specific memory layout via a blocking ready send operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to send

  • l – memory layout of the data to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest rsend_init(iterT begin, iterT end, int destination, tag_t t = tag_t{0}) const#

Creates a persistent communication request to send a message with a several values given by a pair of iterators via a blocking ready send operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send

  • end – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline status_t recv(T &data, int source, tag_t t = tag_t{0}) const#

Receives a message with a single value.

Note

Receiving STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename T>
inline status_t recv(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values having a specific memory layout.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename iterT>
inline status_t recv(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values given by a pair of iterators.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the receive operation

template<typename T>
inline irequest irecv(T &data, int source, tag_t t = tag_t{0}) const#

Receives a message with a single value via a non-blocking receive operation.

Note

Receiving STL containers is a convenience feature, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing receive operation

template<typename T>
inline irequest irecv(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Receives a message with several values having a specific memory layout via a non-blocking receive operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing receive operation

template<typename iterT>
inline irequest irecv(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Receives a message with a several values given by a pair of iterators via a non-blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

request representing the ongoing message transfer

template<typename T>
inline prequest recv_init(T &data, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a single value via a blocking receive operation.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – value to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename T>
inline prequest recv_init(T *data, const layout<T> &l, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a several values having a specific memory layout via a blocking standard send operation.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • source – rank of the sending process

  • t – tag associated to this message

Returns:

persistent communication request

template<typename iterT>
inline prequest recv_init(iterT begin, iterT end, int source, tag_t t = tag_t{0}) const#

Creates a persistent communication request to receive a message with a several values given by a pair of iterators via a blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending ing process

  • t – tag associated to this message

Returns:

persistent communication request

inline status_t probe(int source, tag_t t = tag_t{0}) const#

Blocking test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the pending message

inline std::optional<status_t> iprobe(int source, tag_t t = tag_t{0}) const#

Non-blocking test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

status of the pending message if there is any pending message

inline mprobe_status mprobe(int source, tag_t t = tag_t{0}) const#

Blocking matched test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

message handle and status of the pending message

inline std::optional<mprobe_status> improbe(int source, tag_t t = tag_t{0}) const#

Blocking matched test for an incoming message.

Parameters:
  • source – rank of the sending process

  • t – tag associated to this message

Returns:

message handle and status of the pending message if there is a pending message by the given source and with the given tag

template<typename T>
inline status_t mrecv(T &data, message_t &m) const#

Receives a message with a single value by a message handle.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section or an STL container that holds elements that comply with the mentioned requirements

Parameters:
  • data – value to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename T>
inline status_t mrecv(T *data, const layout<T> &l, message_t &m) const#

Receives a message with a several values having a specific memory layout by a message handle.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename iterT>
inline status_t mrecv(iterT begin, iterT end, message_t &m) const#

Receives a message with a several values given by a pair of iterators by a message handle.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • m – message handle of message to receive

Returns:

status of the receive operation

template<typename T>
inline irequest imrecv(T &data, message_t &m) const#

Receives a message with a single value via a non-blocking receive operation by a message handle.

Note

Receiving STL containers is not supported.

Template Parameters:

T – type of the data to receive, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing receive operation

template<typename T>
inline irequest imrecv(T *data, const layout<T> &l, message_t &m) const#

Receives a message with several values having a specific memory layout via a non-blocking receive operation by a message handle.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – pointer to the data to receive

  • l – memory layout of the data to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing receive operation

template<typename iterT>
inline irequest imrecv(iterT begin, iterT end, message_t &m) const#

Receives a message with a several values given by a pair of iterators via a non-blocking receive operation.

Note

This is a convenience method, which may have non-optimal performance characteristics. Use alternative overloads in performance critical code sections.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to receive

  • end – iterator pointing one element beyond the last data value to receive

  • m – message handle of message to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline status_t sendrecv(const T &send_data, int destination, tag_t send_tag, T &recv_data, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • recv_data – data to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv(const T *send_data, const layout<T> &sendl, int destination, tag_t send_tag, T *recv_data, const layout<T> &recvl, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename iterT1, typename iterT2>
inline status_t sendrecv(iterT1 begin_1, iterT1 end_1, int destination, tag_t send_tag, iterT2 begin_2, iterT2 end_2, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:
Parameters:
  • begin_1 – iterator pointing to the first data value to send

  • end_1 – iterator pointing one element beyond the last data value to send

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • begin_2 – iterator pointing to the first data value to receive

  • end_2 – iterator pointing one element beyond the last data value to receive

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv_replace(T &data, int destination, tag_t send_tag, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – data to send, will hold the received data

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename T>
inline status_t sendrecv_replace(T *data, const layout<T> &l, int destination, tag_t send_tag, int source, tag_t recv_tag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • data – data to send, will hold the received data

  • l – memory layout of the data to send and receive

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recv_tag – tag associated to the data to receive

Returns:

status of the receive operation

template<typename iterT>
inline status_t sendrecv_replace(iterT begin, iterT end, int destination, tag_t send_tag, int source, tag_t recvtag) const#

Sends a message and receives a message in a single operation.

Template Parameters:

iterT – iterator type, must fulfill the requirements of a LegacyForwardIterator, the iterator’s value-type must meet the requirements as described in the Supported data types section

Parameters:
  • begin – iterator pointing to the first data value to send and to receive

  • end – iterator pointing one element beyond the last data value to send and to receive

  • destination – rank of the receiving process

  • send_tag – tag associated to the data to send

  • source – rank of the sending process

  • recvtag – tag associated to the data to receive

Returns:

status of the receive operation

inline void barrier() const#

Blocks until all processes in the communicator have reached this method.

Note

This is a collective operation and must be called by all processes in the communicator.

inline irequest ibarrier() const#

Notifies the process that it has reached the barrier and returns immediately.

Note

This is a collective operation and must be called by all processes in the communicator.

Returns:

communication request

template<typename T>
inline void bcast(int root_rank, T &data) const#

Broadcasts a message from a process to all other processes.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

template<typename T>
inline void bcast(int root_rank, T *data, const layout<T> &l) const#

Broadcasts a message from a process to all other processes.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

  • l – memory layout of the data to send/receive

template<typename T>
inline irequest ibcast(int root_rank, T &data) const#

Broadcasts a message from a process to all other processes in a non-blocking manner.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ibcast(int root_rank, T *data, const layout<T> &l) const#

Broadcasts a message from a process to all other processes in a non-blocking manner.

Note

This is a collective operation and must be called by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • data – buffer for sending/receiving data

  • l – memory layout of the data to send/receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void gather(int root_rank, const T &send_data, T *recv_data) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

template<typename T>
inline void gather(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvl – memory layout of the data to receive

template<typename T>
inline void gather(int root_rank, const T &send_data) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

template<typename T>
inline void gather(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

template<typename T>
inline irequest igather(int root_rank, const T &send_data, T *recv_data) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T &send_data) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igather(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data buffer for sending data

  • sendl – memory layout of the data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

  • recvdispls – displacements of the data to receive by the root rank

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

template<typename T>
inline void gatherv(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages with a variable amount of data from all processes at a single root process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

  • recvdispls – displacements of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages, may be a null pointer at non-root processes

  • recvls – memory layouts of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest igatherv(int root_rank, const T *send_data, const layout<T> &sendl) const#

Gather messages with a variable amount of data from all processes at a single root process in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the receiving process

  • send_data – data to send

  • sendl – memory layout of the data to send

Returns:

request representing the ongoing message transfer

template<typename T>
inline void allgather(const T &send_data, T *recv_data) const#

Gather messages from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages

template<typename T>
inline void allgather(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

template<typename T>
inline irequest iallgather(const T &send_data, T *recv_data) const#

Gather messages from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • recv_data – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iallgather(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Gather messages from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void allgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void allgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline irequest iallgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iallgatherv(const T *send_data, const layout<T> &sendl, T *recv_data, const layouts<T> &recvls) const#

Gather messages with a variable amount of data from all processes and distribute result to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – data to send

  • sendl – memory layout of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void scatter(int root_rank, const T *send_data, T &recv_data) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • recv_data – data to receive

template<typename T>
inline void scatter(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendl – memory layout of the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

template<typename T>
inline void scatter(int root_rank, T &recv_data) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

template<typename T>
inline void scatter(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

template<typename T>
inline irequest iscatter(int root_rank, const T *send_data, T &recv_data) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • recv_data – data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendl – memory layout of the data to send

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, T &recv_data) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatter(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Parameters:
  • root_rank – rank of the sending process

  • recv_data – data to receive

  • recvl – memory layout of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void scatterv(int root_rank, const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send by the root rank

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline void scatterv(int root_rank, const T *send_data, const layouts<T> &sendls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline void scatterv(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

template<typename T>
inline irequest iscatterv(int root_rank, const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send by the root rank

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatterv(int root_rank, const T *send_data, const layouts<T> &sendls, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • send_data – pointer to continuous storage for outgoing messages, may be a null pointer at non-root processes

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest iscatterv(int root_rank, T *recv_data, const layout<T> &recvl) const#

Scatter messages with a variable amount of data from a single root process to all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator. This particular overload can only be called by non-root processes.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • root_rank – rank of the sending process

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layout of the data to receive by the root rank

Returns:

request representing the ongoing message transfer

template<typename T>
inline void alltoall(const T *send_data, T *recv_data) const#

Sends messages to all processes and receives messages from all processes.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array send_data is sent to the i-th process. When the function has finished, the i-th element in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • recv_data – pointer to continuous storage for incoming messages

template<typename T>
inline void alltoall(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Sends messages to all processes and receives messages from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array send_data is sent to the i-th process. When the function has finished, the i-th memory block with the layout recvl in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

template<typename T>
inline irequest ialltoall(const T *send_data, T *recv_data) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner.

Each process in the communicator sends one element of type T to each process (including itself) and receives one element of type T from each process. The i-th element in the array send_data is sent to the i-th process. When the message transfer has finished, the i-th element in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • recv_data – pointer to continuous storage for incoming messages

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoall(const T *send_data, const layout<T> &sendl, T *recv_data, const layout<T> &recvl) const#

Sends messages to all processes and receives messages from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. The memory layouts of the incoming and the outgoing messages are described by sendl and recvl. Both layouts might differ but must be compatible, i.e., must hold the same number of elements of type T. The i-th memory block with the layout sendl in the array send_data is sent to the i-th process. When the message transfer has finished, the i-th memory block with the layout recvl in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendl – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvl – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline void alltoallv(const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts senddispls[i] bytes after the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts recvdispls[i] bytes after the address given in recv_data. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

template<typename T>
inline void alltoallv(const T *send_data, const layouts<T> &sendls, T *recv_data, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts at the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts at the address given in recv_data. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send- or receive blocks. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

template<typename T>
inline irequest ialltoallv(const T *send_data, const layouts<T> &sendls, const displacements &senddispls, T *recv_data, const layouts<T> &recvls, const displacements &recvdispls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts senddispls[i] bytes after the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts recvdispls[i] bytes after the address given in recv_data. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • senddispls – displacements of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

  • recvdispls – displacements of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T>
inline irequest ialltoallv(const T *send_data, const layouts<T> &sendls, T *recv_data, const layouts<T> &recvls) const#

Sends messages with a variable amount of data to all processes and receives messages with a variable amount of data from all processes in a non-blocking manner.

Each process in the communicator sends elements of type T to each process (including itself) and receives elements of type T from each process. Send- and receive-data are stored in consecutive blocks of variable size in the buffers send_data and recv_data, respectively. The i-th memory block with the layout sendls[i] in the array send_data starts at the address given in send_data. The i-th memory block is sent to the i-th process. The i-th memory block with the layout recvls[i] in the array recv_data starts at the address given in recv_data. Note that the memory layouts need to include appropriate holes at the beginning in order to avoid overlapping send- or receive blocks. When the function has finished, the i-th memory block in the array recv_data was received from the i-th process.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:

T – type of the data to send, must meet the requirements as described in the Supported data types section

Parameters:
  • send_data – pointer to continuous storage for outgoing messages

  • sendls – memory layouts of the data to send

  • recv_data – pointer to continuous storage for incoming messages

  • recvls – memory layouts of the data to receive

Returns:

request representing the ongoing message transfer

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation if rank equals root_rank

template<typename T, typename F>
inline void reduce(F f, int root_rank, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation if rank equals root_rank, may be nullptr if rank does no equal to root_rank

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation if rank equals root_rank

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce(F f, int root_rank, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • root_rank – rank of the process that will receive the reduction result

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation if rank equals root_rank, may be nullptr if rank does no equal to root_rank

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void allreduce(F f, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes and broadcasts the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void allreduce(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iallreduce(F f, const T &send_data, T &recv_data) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iallreduce(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a reduction operation over all processes and broadcasts the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void reduce_scatter_block(F f, const T *send_data, T &recv_data) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the size of the communicator

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void reduce_scatter_block(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &recvcount) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the size of the communicator times the number of elements given by the layout parameter

  • recv_data – will hold the results of the reduction operation

  • recvcount – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce_scatter_block(F f, const T *send_data, T &recv_data) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation, number of elements in buffer send_data must equal the size of the communicator

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest ireduce_scatter_block(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &recvcount) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation, number of elements in buffer send_data must equal the size of the communicator times the number of elements given by the layout parameter

  • recv_data – will hold the results of the reduction operation

  • recvcount – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void reduce_scatter(F f, const T *send_data, T *recv_data, const contiguous_layouts<T> &recvcounts) const#

Performs a reduction operation over all processes and scatters the result.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the sum of the number of elements given by the collection of layout parameters

  • recv_data – will hold the results of the reduction operation

  • recvcounts – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest ireduce_scatter(F f, const T *send_data, T *recv_data, contiguous_layouts<T> &recvcounts) const#

Performs a reduction operation over all processes and scatters the result in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation, number of elements in buffer send_data must equal the sum of the number of elements given by the collection of layout parameters

  • recv_data – will hold the results of the reduction operation

  • recvcounts – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void scan(F f, const T &send_data, T &recv_data) const#

Performs partial reduction operation (scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void scan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iscan(F f, const T &send_data, T &recv_data) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline void exscan(F f, const T &send_data, T &recv_data) const#

Performs partial reduction operation (exclusive scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

template<typename T, typename F>
inline void exscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

template<typename T, typename F>
inline irequest iexscan(F f, const T &send_data, T &recv_data) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input data for the reduction operation

  • recv_data – will hold the result of the reduction operation

Returns:

request representing the ongoing reduction operation

template<typename T, typename F>
inline irequest iexscan(F f, const T *send_data, T *recv_data, const contiguous_layout<T> &l) const#

Performs a partial reduction operation (exclusive scan) over all processes in a non-blocking manner.

Note

This is a collective operation and must be called (possibly by utilizing another overload) by all processes in the communicator.

Template Parameters:
  • F – type representing the element-wise reduction operation, reduction operation is performed on data of type T

  • T – type of input and output data of the reduction operation, must meet the requirements as described in the Supported data types section

Parameters:
  • f – reduction operation

  • send_data – input buffer for the reduction operation

  • recv_data – will hold the results of the reduction operation

  • l – memory layouts of the data to send and to receive

Returns:

request representing the ongoing reduction operation

Public Static Functions

static inline const inter_communicator &parent()#

Get the parent inter-communicator of the current process, which is created when the process was spawned.

Returns:

inter-communicator that establishes a communication channel between the spawning process group and the new spawned processes

Public Static Attributes

static constexpr equality_type identical = equality_type::identical#

indicates that inter-communicators are identical, i.e., inter-communicators represent the same inter-communication context with the identical local and remote groups

static constexpr equality_type congruent = equality_type::congruent#

indicates that inter-communicators are identical, i.e., inter-communicators have local and remote groups with the same members in same rank order but a different context

static constexpr equality_type similar = equality_type::similar#

indicates that inter-communicators are similar, i.e., inter-communicators have local and remote groups with the same members in different rank order

static constexpr equality_type unequal = equality_type::unequal#

inter-communicators are unequal, i.e., inter-communicators have different local and remote groups

static constexpr comm_collective_tag comm_collective = {}#

Indicates the creation of a new communicator by an operation that is collective for all processes in the given communicator.

static constexpr group_collective_tag group_collective = {}#

Indicates the creation of a new communicator by an operation that is collective for all processes in the given group.

static constexpr split_tag split = {}#

Indicates the creation of a new communicator by spitting an existing communicator into disjoint subgroups.

static constexpr split_shared_memory_tag split_shared_memory = {}#

Indicates the creation of a new communicator by spitting an existing communicator into disjoint subgroups each of which can create a shared memory region.

Friends

friend class group
friend class communicator