|
KaMPIng 0.2.0
Flexible and (near) zero-overhead C++ bindings for MPI
|
KaMPIng's point-to-point communication wrappers. More...
Functions | |
| template<typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::iprobe (Args... args) const |
Wrapper for MPI_Iprobe. | |
| template<typename recv_value_type_tparam = kamping::internal::unused_tparam, typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::irecv (Args... args) const |
Wrapper for MPI_Recv. | |
| template<typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::isend (Args... args) const |
Wrapper for MPI_Isend. | |
| template<typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::ibsend (Args... args) const |
| Convenience wrapper for MPI_Ibsend. Calls kamping::Communicator::isend() with the appropriate send mode set. | |
| template<typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::issend (Args... args) const |
| Convenience wrapper for MPI_Issend. Calls kamping::Communicator::isend() with the appropriate send mode set. | |
| template<typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::irsend (Args... args) const |
| Convenience wrapper for MPI_Irsend. Calls kamping::Communicator::isend() with the appropriate send mode set. | |
| template<typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::probe (Args... args) const |
Wrapper for MPI_Probe. | |
| template<typename recv_value_type_tparam = kamping::internal::unused_tparam, typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::recv (Args... args) const |
Wrapper for MPI_Recv. | |
| template<typename recv_value_type_tparam , typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::recv_single (Args... args) const |
Convience wrapper for receiving single values via MPI_Recv. | |
| template<typename... Args> | |
| void | kamping::Communicator< DefaultContainerType, Plugins >::send (Args... args) const |
Wrapper for MPI_Send. | |
| template<typename... Args> | |
| void | kamping::Communicator< DefaultContainerType, Plugins >::bsend (Args... args) const |
| Convenience wrapper for MPI_Bsend. Calls kamping::Communicator::send() with the appropriate send mode set. | |
| template<typename... Args> | |
| void | kamping::Communicator< DefaultContainerType, Plugins >::ssend (Args... args) const |
| Convenience wrapper for MPI_Ssend. Calls kamping::Communicator::send() with the appropriate send mode set. | |
| template<typename... Args> | |
| void | kamping::Communicator< DefaultContainerType, Plugins >::rsend (Args... args) const |
| Convenience wrapper for MPI_Rsend. Calls kamping::Communicator::send() with the appropriate send mode set. | |
| template<typename recv_value_type_tparam = kamping::internal::unused_tparam, typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::sendrecv (Args... args) const |
Wrapper for MPI_Sendrecv. | |
| template<typename recv_value_type_tparam = kamping::internal::unused_tparam, typename... Args> | |
| auto | kamping::Communicator< DefaultContainerType, Plugins >::try_recv (Args... args) const |
| Receives a message if one is available. | |
KaMPIng's point-to-point communication wrappers.
| auto kamping::Communicator< DefaultContainerType, Plugins >::iprobe | ( | Args... | args | ) | const |
Wrapper for MPI_Iprobe.
This wraps MPI_Iprobe. This operation checks if there is a message matching the (optionally) specified source and tag that can be received, and returns a bool indicating whether a message matched by default. If the user passes kamping::status_out(), returns a std::optional containing an kamping::MPIResult, which encapsulates a status object. If the probe does not match any message, returns std::nullopt.
The following parameters are optional:
tag(tags::any).source(rank::any).kamping::status(kamping::ignore<>). This is the default.| Args | Automatically deduced template parameters. |
| args | All required and any number of the optional buffers described above. |
| auto kamping::Communicator< DefaultContainerType, Plugins >::irecv | ( | Args... | args | ) | const |
Wrapper for MPI_Recv.
This wraps MPI_Irecv. This operation performs a standard non-blocking receive. If the kamping::recv_counts() parameter is not specified, this first performs a (blocking) probe, followed by a (non-blocking) receive of the probed message with the probed message size. The call is associated with a kamping::Request (either allocated by KaMPIng or provided by the user). Before accessing the result the user has to complete the request.
The following parameters are optional:
value_type of the recv buffer has to be passed as a template parameter to recv().tag(tags::any).source(rank::any).MPI datatype to use as recv type. If omitted, the MPI datatype is derived automatically based on recv_buf's underlying value_type.The following parameter is optional, but leads to an additional call to MPI_Probe if not present:
| Args | Automatically deduced template parameters. |
| args | All required and any number of the optional parameters described above. |
The underlying container/storage of an out parameter encapsulating a data buffer (e.g. recv_buf/recv_counts, etc.) will be resized according to the parameter's resize policy:
If a send_/recv_/send_recv_type parameter is provided, kamping::BufferResizePolicy::no_resize for receive buffers is required, as KaMPIng can no longer ensure a 1:1 mapping between MPI_Datatype and the underlying storage's C++ type.
| auto kamping::Communicator< DefaultContainerType, Plugins >::isend | ( | Args... | args | ) | const |
Wrapper for MPI_Isend.
This wraps MPI_Isend. This operation sends the elements in the input buffer provided via kamping::send_buf() to the specified receiver rank using standard send mode without blocking. The call is associated with a kamping::Request (either allocated by KaMPIng or provided by the user). Before accessing the result the user has to complete the request.
The following parameters are required:
The following parameters are optional:
MPI datatype to use as send type. If omitted, the MPI datatype is derived automatically based on send_buf's underlying value_type.| Args | Automatically deduced template parameters. |
| args | All required and any number of the optional parameters described above. |
The underlying container/storage of an out parameter encapsulating a data buffer (e.g. recv_buf/recv_counts, etc.) will be resized according to the parameter's resize policy:
If a send_/recv_/send_recv_type parameter is provided, kamping::BufferResizePolicy::no_resize for receive buffers is required, as KaMPIng can no longer ensure a 1:1 mapping between MPI_Datatype and the underlying storage's C++ type.
| auto kamping::Communicator< DefaultContainerType, Plugins >::probe | ( | Args... | args | ) | const |
Wrapper for MPI_Probe.
This wraps MPI_Probe. This operation probes for a message and returns a status object with info about the probe message. The following parameters are optional:
source(rank::any).tag(tags::any).kamping::status(ignore<>) or kamping::status_out(). Returns info about the probed message by setting the appropriate fields in the status object passed by the user. If kamping::status_out() is passed, constructs a status object which may be retrieved by the user. The status can be ignored by passing kamping::status(kamping::ignore<>). This is the default.| Args | Automatically deduced template parameters. |
| args | All required and any number of the optional buffers described above. |
| auto kamping::Communicator< DefaultContainerType, Plugins >::recv | ( | Args... | args | ) | const |
Wrapper for MPI_Recv.
This wraps MPI_Recv. This operation performs a standard blocking receive. If the kamping::recv_counts() parameter is not specified, this first performs a probe, followed by a receive of the probed message with the probed message size.
The following parameter is optional, but leads to an additional call to MPI_Probe if not present:
The following parameters are optional:
value_type of the recv buffer has to be passed as a template parameter to recv().MPI datatype to use as recv type. If omitted, the MPI datatype is derived automatically based on recv_buf's underlying value_type.source(rank::any).tag(tags::any).kamping::status(ignore<>) or kamping::status_out(). Returns info about the received message by setting the appropriate fields in the status object passed by the user. If kamping::status_out() is passed, constructs a status object which may be retrieved by the user. The status can be ignored by passing kamping::status(kamping::ignore<>). This is the default.| Args | Automatically deduced template parameters. |
| args | All required and any number of the optional parameters described above. |
The underlying container/storage of an out parameter encapsulating a data buffer (e.g. recv_buf/recv_counts, etc.) will be resized according to the parameter's resize policy:
If a send_/recv_/send_recv_type parameter is provided, kamping::BufferResizePolicy::no_resize for receive buffers is required, as KaMPIng can no longer ensure a 1:1 mapping between MPI_Datatype and the underlying storage's C++ type.
| auto kamping::Communicator< DefaultContainerType, Plugins >::recv_single | ( | Args... | args | ) | const |
Convience wrapper for receiving single values via MPI_Recv.
This wraps MPI_Recv. This operation performs a standard blocking receive with a receive count of 1 and returns the received value.
The following parameters are optional:
kamping::source(kamping::rank::any).tag(tags::any).kamping::status(kamping::ignore<>). This is the default.| recv_value_type_tparam | The type of the message to be received. |
| Args | Automatically deduced template parameters. |
| args | All required and any number of the optional buffers described above. |
recv_value_type_tparam. | void kamping::Communicator< DefaultContainerType, Plugins >::send | ( | Args... | args | ) | const |
Wrapper for MPI_Send.
This wraps MPI_Send. This operation sends the elements in the input buffer provided via kamping::send_buf() to the specified receiver rank using standard send mode. The following parameters are required:
MPI datatype to use as send type. If omitted, the MPI datatype is derived automatically based on send_buf's underlying value_type.The following parameters are optional:
| Args | Automatically deduced template parameters. |
| args | All required and any number of the optional parameters described above. |
The underlying container/storage of an out parameter encapsulating a data buffer (e.g. recv_buf/recv_counts, etc.) will be resized according to the parameter's resize policy:
If a send_/recv_/send_recv_type parameter is provided, kamping::BufferResizePolicy::no_resize for receive buffers is required, as KaMPIng can no longer ensure a 1:1 mapping between MPI_Datatype and the underlying storage's C++ type.
| auto kamping::Communicator< DefaultContainerType, Plugins >::sendrecv | ( | Args... | args | ) | const |
Wrapper for MPI_Sendrecv.
This wraps MPI_Sendrecv. This operation performs a blocking send and receive operation. If the kamping::recv_counts() parameter is not specified, this first performs a sendrecv, sending and receiving the recv count.
The following parameters are required:
The following parameter is optional, but leads to an additional call to MPI_Sendrecv if not present:
send(). This will lead to unintended behavior, if sendrecv() is used in combination with send() or recv() while omitting the kamping::recv_counts() parameter.The following parameters are optional:
value_type of the recv buffer has to be passed as a template parameter to sendrecv().source(rank::any).tag(tags::any).kamping::status(ignore<>) or kamping::status_out(). Returns info about the received message by setting the appropriate fields in the status object passed by the user. If kamping::status_out() is passed, constructs a status object which may be retrieved by the user. The status can be ignored by passing kamping::status(kamping::ignore<>). This is the default.| Args | Automatically deduced template parameters. |
| recv_value_type_tparam | The type of the message to be received. |
| args | All required and any number of the optional parameters described above. |
| auto kamping::Communicator< DefaultContainerType, Plugins >::try_recv | ( | Args... | args | ) | const |
Receives a message if one is available.
In contrast to kamping::Communicator::recv(), this method does not block if no message is available. Instead, it will return a empty std::optional. Internally, this first does a matched probe (MPI_Improbe) to check if a message is available. If a message is available, it will be received using a matched receive (MPI_Mrecv).
The following parameters are optional:
value_type of the recv buffer has to be passed as a template parameter to recv().tag(tags::any).source(rank::any).kamping::status_out and ignored by passing kamping::ignore<>. This is the default.MPI datatype to use as the recv type. If omitted, the MPI datatype is derived automatically based on recv_buf's underlying value_type.| recv_value_type_tparam | The type that is received. Only required when no kamping::recv_buf() is given. |
| Args | Automatically deduced template parameters. |
| args | All required and any number of the optional buffers described above. |
std::nullopt, else return a std::optional wrapping an kamping::MPIResult. If the result object is empty, i.e. there are no owning out parameters passed to try_recv (see docs/parameter_handling.md), returns a bool indicating success instead of an std::optional.The underlying container/storage of an out parameter encapsulating a data buffer (e.g. recv_buf/recv_counts, etc.) will be resized according to the parameter's resize policy:
If a send_/recv_/send_recv_type parameter is provided, kamping::BufferResizePolicy::no_resize for receive buffers is required, as KaMPIng can no longer ensure a 1:1 mapping between MPI_Datatype and the underlying storage's C++ type.