GEOS
|
#include <MpiWrapper.hpp>
Classes | |
struct | PairType |
Public Types | |
enum class | Reduction { Max , Min , Sum , Prod , LogicalAnd , LogicalOr } |
enum class | PairReduction { Max , Min } |
Public Member Functions | |
template<typename T_SEND , typename T_RECV > | |
int | allgather (T_SEND const *const sendbuf, int sendcount, T_RECV *const recvbuf, int recvcount, MPI_Comm MPI_PARAM(comm)) |
template<typename T_SEND , typename T_RECV > | |
int | allgatherv (T_SEND const *const sendbuf, int sendcount, T_RECV *const recvbuf, int *recvcounts, int *displacements, MPI_Comm MPI_PARAM(comm)) |
template<typename T > | |
void | allGather (T const myValue, array1d< T > &allValues, MPI_Comm MPI_PARAM(comm)) |
template<typename T > | |
int | allGather (arrayView1d< T const > const &sendValues, array1d< T > &allValues, MPI_Comm MPI_PARAM(comm)) |
template<typename T > | |
int | allReduce (T const *const sendbuf, T *const recvbuf, int const count, MPI_Op const MPI_PARAM(op), MPI_Comm const MPI_PARAM(comm)) |
template<typename T > | |
int | reduce (T const *const sendbuf, T *const recvbuf, int const count, MPI_Op const MPI_PARAM(op), int root, MPI_Comm const MPI_PARAM(comm)) |
template<typename T > | |
int | scan (T const *const sendbuf, T *const recvbuf, int count, MPI_Op MPI_PARAM(op), MPI_Comm MPI_PARAM(comm)) |
template<typename T > | |
int | exscan (T const *const MPI_PARAM(sendbuf), T *const recvbuf, int count, MPI_Op MPI_PARAM(op), MPI_Comm MPI_PARAM(comm)) |
template<typename T > | |
int | bcast (T *const MPI_PARAM(buffer), int MPI_PARAM(count), int MPI_PARAM(root), MPI_Comm MPI_PARAM(comm)) |
template<typename T > | |
void | broadcast (T &MPI_PARAM(value), int MPI_PARAM(srcRank), MPI_Comm MPI_PARAM(comm)) |
template<typename TS , typename TR > | |
int | gather (TS const *const sendbuf, int sendcount, TR *const recvbuf, int recvcount, int MPI_PARAM(root), MPI_Comm MPI_PARAM(comm)) |
template<typename T , typename DST_CONTAINER , typename > | |
int | gather (T const &value, DST_CONTAINER &destValuesBuffer, int root, MPI_Comm MPI_PARAM(comm)) |
template<typename TS , typename TR > | |
int | gatherv (TS const *const sendbuf, int sendcount, TR *const recvbuf, const int *recvcounts, const int *MPI_PARAM(displs), int MPI_PARAM(root), MPI_Comm MPI_PARAM(comm)) |
template<typename T > | |
int | iRecv (T *const buf, int count, int MPI_PARAM(source), int tag, MPI_Comm MPI_PARAM(comm), MPI_Request *MPI_PARAM(request)) |
template<typename T > | |
int | iSend (T const *const buf, int count, int MPI_PARAM(dest), int tag, MPI_Comm MPI_PARAM(comm), MPI_Request *MPI_PARAM(request)) |
Static Public Member Functions | |||||||||||||||||||
static std::map< int, std::pair< int, void * > > & | getTagToPointersMap () | ||||||||||||||||||
static int | nodeCommSize () | ||||||||||||||||||
Compute the number of ranks allocated on the same node. More... | |||||||||||||||||||
template<typename T_SEND , typename T_RECV > | |||||||||||||||||||
static int | allgather (T_SEND const *sendbuf, int sendcount, T_RECV *recvbuf, int recvcount, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Strongly typed wrapper around MPI_Allgather. More... | |||||||||||||||||||
template<typename T_SEND , typename T_RECV > | |||||||||||||||||||
static int | allgatherv (T_SEND const *sendbuf, int sendcount, T_RECV *recvbuf, int *recvcounts, int *displacements, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Strongly typed wrapper around MPI_Allgatherv. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static void | allGather (T const myValue, array1d< T > &allValues, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for MPI_Allgather. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static int | allGather (arrayView1d< T const > const &sendbuf, array1d< T > &recvbuf, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
template<typename T > | |||||||||||||||||||
static T | allReduce (T const &value, Reduction const op, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience wrapper for the MPI_Allreduce function. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static void | allReduce (Span< T const > src, Span< T > dst, Reduction const op, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience wrapper for the MPI_Allreduce function. Version for sequences. More... | |||||||||||||||||||
template<typename SRC_CONTAINER_TYPE , typename DST_CONTAINER_TYPE > | |||||||||||||||||||
static void | allReduce (SRC_CONTAINER_TYPE const &src, DST_CONTAINER_TYPE &dst, Reduction const op, MPI_Comm const comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience wrapper for the MPI_Allreduce function. Version for arrays. More... | |||||||||||||||||||
template<typename SRC_CONTAINER_TYPE , typename DST_CONTAINER_TYPE > | |||||||||||||||||||
static void | allReduce (SRC_CONTAINER_TYPE const &src, DST_CONTAINER_TYPE &dst, int const count, Reduction const op, MPI_Comm const comm) | ||||||||||||||||||
Convenience wrapper for the MPI_Allreduce function. Version for arrays. More... | |||||||||||||||||||
template<typename FIRST , typename SECOND , PairReduction OP> | |||||||||||||||||||
static PairType< FIRST, SECOND > | allReduce (PairType< FIRST, SECOND > const &pair, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Perform a collective reduction on a pair using MPI. More... | |||||||||||||||||||
template<typename FIRST , typename SECOND , typename CONTAINER , PairReduction OP> | |||||||||||||||||||
static PairType< FIRST, SECOND > | allReduce (CONTAINER const &pairs, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Perform a collective reduction on a container of pairs using MPI. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static int | reduce (T const *sendbuf, T *recvbuf, int count, MPI_Op op, int root, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Strongly typed wrapper around MPI_Reduce. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static T | reduce (T const &value, Reduction const op, int root, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience wrapper for the MPI_Reduce function. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static void | reduce (Span< T const > src, Span< T > dst, Reduction const op, int root, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience wrapper for the MPI_Reduce function. Version for sequences. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static int | scan (T const *sendbuf, T *recvbuf, int count, MPI_Op op, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
template<typename T > | |||||||||||||||||||
static int | exscan (T const *sendbuf, T *recvbuf, int count, MPI_Op op, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
template<typename T > | |||||||||||||||||||
static int | bcast (T *buffer, int count, int root, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Strongly typed wrapper around MPI_Bcast. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static void | broadcast (T &value, int srcRank=0, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for MPI_Broadcast. More... | |||||||||||||||||||
template<typename TS , typename TR > | |||||||||||||||||||
static int | gather (TS const *const sendbuf, int sendcount, TR *const recvbuf, int recvcount, int root, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Strongly typed wrapper around MPI_Gather(). More... | |||||||||||||||||||
template<typename T , typename DST_CONTAINER , typename = std::enable_if_t< std::is_trivially_copyable_v< T > && std::is_same_v< decltype(std::declval< DST_CONTAINER >().size()), std::size_t > && std::is_same_v< decltype(std::declval< DST_CONTAINER >().data()), T * >> | |||||||||||||||||||
static int | gather (T const &value, DST_CONTAINER &destValuesBuffer, int root, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Strongly typed wrapper around MPI_Gather(). More... | |||||||||||||||||||
template<typename TS , typename TR > | |||||||||||||||||||
static int | gatherv (TS const *const sendbuf, int sendcount, TR *const recvbuf, const int *recvcounts, const int *displs, int root, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Strongly typed wrapper around MPI_Gatherv. More... | |||||||||||||||||||
static MPI_Op | getMpiOp (Reduction const op) | ||||||||||||||||||
Returns an MPI_Op associated with our strongly typed Reduction enum. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static int | recv (array1d< T > &buf, int MPI_PARAM(source), int tag, MPI_Comm MPI_PARAM(comm), MPI_Status *MPI_PARAM(request)) | ||||||||||||||||||
template<typename T > | |||||||||||||||||||
static int | iSend (arrayView1d< T > const &buf, int MPI_PARAM(dest), int tag, MPI_Comm MPI_PARAM(comm), MPI_Request *MPI_PARAM(request)) | ||||||||||||||||||
template<typename T > | |||||||||||||||||||
static int | iRecv (T *const buf, int count, int source, int tag, MPI_Comm comm, MPI_Request *request) | ||||||||||||||||||
Strongly typed wrapper around MPI_Irecv() More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static int | iSend (T const *const buf, int count, int dest, int tag, MPI_Comm comm, MPI_Request *request) | ||||||||||||||||||
Strongly typed wrapper around MPI_Isend() More... | |||||||||||||||||||
template<typename U , typename T > | |||||||||||||||||||
static U | prefixSum (T const value, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Compute exclusive prefix sum and full sum. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static T | sum (T const &value, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for a MPI_Allreduce using a MPI_SUM operation. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static void | sum (Span< T const > src, Span< T > dst, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for a MPI_Allreduce using a MPI_SUM operation. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static T | min (T const &value, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for a MPI_Allreduce using a MPI_MIN operation. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static void | min (Span< T const > src, Span< T > dst, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for a MPI_Allreduce using a MPI_MIN operation. More... | |||||||||||||||||||
template<typename FIRST , typename SECOND > | |||||||||||||||||||
static PairType< FIRST, SECOND > | min (PairType< FIRST, SECOND > const &pair, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for a MPI_Allreduce using a min-pair operation. More... | |||||||||||||||||||
template<typename FIRST , typename SECOND , typename CONTAINER > | |||||||||||||||||||
static PairType< FIRST, SECOND > | min (CONTAINER const &pairs, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for a MPI_Allreduce using a min-pair operation. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static T | max (T const &value, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for a MPI_Allreduce using a MPI_MAX operation. More... | |||||||||||||||||||
template<typename T > | |||||||||||||||||||
static void | max (Span< T const > src, Span< T > dst, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for a MPI_Allreduce using a MPI_MAX operation. More... | |||||||||||||||||||
template<typename FIRST , typename SECOND > | |||||||||||||||||||
static PairType< FIRST, SECOND > | max (PairType< FIRST, SECOND > const &pair, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for a MPI_Allreduce using a max-pair operation. More... | |||||||||||||||||||
template<typename FIRST , typename SECOND , typename CONTAINER > | |||||||||||||||||||
static PairType< FIRST, SECOND > | max (CONTAINER const &pairs, MPI_Comm comm=MPI_COMM_GEOS) | ||||||||||||||||||
Convenience function for a MPI_Allreduce using a max-pair operation. More... | |||||||||||||||||||
template<> | |||||||||||||||||||
void | broadcast (string &MPI_PARAM(value), int MPI_PARAM(srcRank), MPI_Comm MPI_PARAM(comm)) | ||||||||||||||||||
FUNCTION GROUP for the direct wrappers around naitive MPI functions | |||||||||||||||||||
Please see standard MPI documentation for a detailed description of the parameters for each function that is being wrapped | |||||||||||||||||||
static void | barrier (MPI_Comm const &MPI_PARAM(comm)=MPI_COMM_GEOS) | ||||||||||||||||||
static int | cartCoords (MPI_Comm comm, int rank, int maxdims, int coords[]) | ||||||||||||||||||
static int | cartCreate (MPI_Comm comm_old, int ndims, const int dims[], const int periods[], int reorder, MPI_Comm *comm_cart) | ||||||||||||||||||
static int | cartRank (MPI_Comm comm, const int coords[]) | ||||||||||||||||||
static void | commFree (MPI_Comm &comm) | ||||||||||||||||||
static int | commRank (MPI_Comm const &MPI_PARAM(comm)=MPI_COMM_GEOS) | ||||||||||||||||||
static int | commSize (MPI_Comm const &MPI_PARAM(comm)=MPI_COMM_GEOS) | ||||||||||||||||||
static bool | commCompare (MPI_Comm const &comm1, MPI_Comm const &comm2) | ||||||||||||||||||
static bool | initialized () | ||||||||||||||||||
static int | init (int *argc, char ***argv) | ||||||||||||||||||
static void | finalize () | ||||||||||||||||||
Free MPI managed resources, then call MPI_Finalize(). Please note that once called, MPI functions, communicators and resources can no longer be used. | |||||||||||||||||||
static MPI_Comm | commDup (MPI_Comm const comm) | ||||||||||||||||||
static MPI_Comm | commSplit (MPI_Comm const comm, int color, int key) | ||||||||||||||||||
static int | test (MPI_Request *request, int *flag, MPI_Status *status) | ||||||||||||||||||
static int | testAny (int count, MPI_Request array_of_requests[], int *idx, int *flags, MPI_Status array_of_statuses[]) | ||||||||||||||||||
static int | testSome (int count, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]) | ||||||||||||||||||
static int | testAll (int count, MPI_Request array_of_requests[], int *flags, MPI_Status array_of_statuses[]) | ||||||||||||||||||
static int | check (MPI_Request *request, int *flag, MPI_Status *status) | ||||||||||||||||||
static int | checkAny (int count, MPI_Request array_of_requests[], int *idx, int *flag, MPI_Status array_of_statuses[]) | ||||||||||||||||||
static int | checkAll (int count, MPI_Request array_of_requests[], int *flag, MPI_Status array_of_statuses[]) | ||||||||||||||||||
static int | wait (MPI_Request *request, MPI_Status *status) | ||||||||||||||||||
static int | waitAny (int count, MPI_Request array_of_requests[], int *indx, MPI_Status array_of_statuses[]) | ||||||||||||||||||
static int | waitSome (int count, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]) | ||||||||||||||||||
static int | waitAll (int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]) | ||||||||||||||||||
static double | wtime (void) | ||||||||||||||||||
static int | activeWaitAny (const int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[], std::function< MPI_Request(int) > func) | ||||||||||||||||||
static int | activeWaitSome (const int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[], std::function< MPI_Request(int) > func) | ||||||||||||||||||
static int | activeWaitSomeCompletePhase (const int participants, std::vector< std::tuple< MPI_Request *, MPI_Status *, std::function< MPI_Request(int) > > > const &phases) | ||||||||||||||||||
static int | activeWaitOrderedCompletePhase (const int participants, std::vector< std::tuple< MPI_Request *, MPI_Status *, std::function< MPI_Request(int) > > > const &phases) | ||||||||||||||||||
This struct is a wrapper for all mpi.h functions that are used in GEOSX, and provides a collection of convenience functions to make using the raw mpi functions simpler.
The static wrapper functions around the mpi.h function are named by removing the "MPI_" from the beginning of the native mpi function name. For instance the "Comm_rank()" function calls "MPI_Comm_rank()". Since all wrapper functions are static, the should be referred to by their scoped name, for example "MpiWrapper::commRank()".
Definition at line 120 of file MpiWrapper.hpp.
|
strong |
Strongly typed enum class for calling collective functions processing pairs (ie. indexed values).
Enumerator | |
---|---|
Max | Max pair first value. |
Min | Min pair first value. |
Definition at line 142 of file MpiWrapper.hpp.
|
strong |
Strongly typed enum class for calling collective functions using MPI_Op
Enumerator | |
---|---|
Max | Max. |
Min | Min. |
Sum | Sum. |
Prod | Prod. |
LogicalAnd | Logical and. |
LogicalOr | Logical or. |
Definition at line 128 of file MpiWrapper.hpp.
|
static |
Wait on MPI_Requests to complete on at a time and trigger a callback to process the completion.
[in] | count | The number of MPI_Requests being processed. |
[in,out] | array_of_requests | The MPI_Requests to actively wait on. |
[in] | func | A callable object accepting an integer denoting the MPI_Request index which has completed. |
|
static |
Active blocking phased communication with multiple participants, each participant in each phase may depend on the previous phases being fully complete prior to entry into a subsequent phase.
[in] | participants | The number of participants in each phase |
[in] | phases | A vector of function objects taking int and returning MPI_Requests denoting the state of that participant in that phase. |
|
static |
Wait on MPI_Requests to complete on or more at a time and trigger a callback to process the completion.
[in] | count | The number of MPI_Requests being processed. |
[in,out] | array_of_requests | The MPI_Requests to actively wait on. |
[in] | func | A callable object accepting an integer denoting the MPI_Request index which has completed. |
|
static |
Active non-blocking phased communication with multiple participants, each participant in each phase may depend on the previous phases being fully complete prior to entry into a subsequent phase.
[in] | participants | The number of participants in each phase |
[in] | phases | A vector of function objects taking int and returning MPI_Requests denoting the state of that participant in that phase. |
|
static |
Convenience function for MPI_Allgather.
T | The type to send/recieve. This must have a valid conversion to MPI_Datatype in getMpiType(); |
[in] | myValue | The value to send. |
[out] | allValues | The values recived from each rank. |
|
static |
Strongly typed wrapper around MPI_Allgather.
T_SEND | The pointer type for sendbuf |
T_RECV | The pointer type for recvbuf |
[in] | sendbuf | The pointer to the sending buffer. |
[in] | sendcount | The number of values to send. |
[out] | recvbuf | The pointer to the receive buffer. |
[in] | recvcount | The number of values to receive. |
[in] | comm | The MPI_Comm over which the gather operates. |
|
static |
Strongly typed wrapper around MPI_Allgatherv.
T_SEND | The pointer type for sendbuf |
T_RECV | The pointer type for recvbuf |
[in] | sendbuf | The pointer to the sending buffer. |
[in] | sendcount | The number of values to send. |
[out] | recvbuf | The pointer to the receive buffer. |
[in] | recvcounts | The number of values to receive. |
[in] | displacements | An array containing the displacement to apply to the message received by each process |
[in] | comm | The MPI_Comm over which the gather operates. |
|
static |
Perform a collective reduction on a container of pairs using MPI.
FIRST | Pairs first element type. Typically a numerical quantity (e.g., real64, int). |
SECOND | Pairs second element type. Typically a numerical quantity (e.g., localIndex, globalIndex). |
CONTAINER | Pairs container type (e.g., std::vector<PairType<FIRST, SECOND>> ). |
OP | The reduction operation to apply (PairReduction::Max or PairReduction::Min ). |
pairs | The local container of pairs to be reduced. |
comm | The MPI communicator to use. |
Definition at line 1406 of file MpiWrapper.hpp.
|
static |
Perform a collective reduction on a pair using MPI.
FIRST | Pair first element type. Typically a numerical quantity (e.g., real64, int). |
SECOND | Pair second element type. Typically a numerical quantity (e.g., localIndex, globalIndex). |
OP | The reduction operation to apply (PairReduction::Max , PairReduction::Min ). |
pair | The local pair to reduce. |
comm | The MPI communicator to use. |
Definition at line 1391 of file MpiWrapper.hpp.
|
static |
Convenience wrapper for the MPI_Allreduce function. Version for sequences.
T | type of data to reduce. Must correspond to a valid MPI_Datatype. |
src[in] | The values to send to the reduction. |
dst[out] | The resulting values. |
op | The Reduction enum to perform. |
comm | The communicator. |
Definition at line 1302 of file MpiWrapper.hpp.
|
static |
Convenience wrapper for the MPI_Allreduce function. Version for arrays.
T | type of data to reduce. Must correspond to a valid MPI_Datatype. |
src[in] | The values to send to the reduction. |
dst[out] | The resulting values. |
count | The number of contiguos elements of the arrays to perform the reduction on (must be leq than the size). |
op | The Reduction enum to perform. |
comm | The communicator. |
Definition at line 1309 of file MpiWrapper.hpp.
|
static |
Convenience wrapper for the MPI_Allreduce function. Version for arrays.
T | type of data to reduce. Must correspond to a valid MPI_Datatype. |
src[in] | The values to send to the reduction. |
dst[out] | The resulting values. |
op | The Reduction enum to perform. |
comm | The communicator. |
Definition at line 1324 of file MpiWrapper.hpp.
|
static |
Convenience wrapper for the MPI_Allreduce function.
T | type of data to reduce. Must correspond to a valid MPI_Datatype. |
value | The value to send to the reduction. |
op | The Reduction enum to perform. |
comm | The communicator. |
Definition at line 1294 of file MpiWrapper.hpp.
|
static |
Strongly typed wrapper around MPI_Bcast.
[in/out] | buffer The pointer to the send/recv buffer | |
[in] | count | The number of data types to send. |
[in] | root | The rank sending the data. |
[in] | comm | The MPI_Comm over which the MPI_Bcast operates. |
|
static |
Convenience function for MPI_Broadcast.
T | The type to send/recieve. This must have a valid conversion to MPI_Type in getMpiType(); |
[in/out] | myValue The value to send from the srcRank to the other ranks. |
srcRank | The rank that is sending the value . |
|
static |
The same as test but doesn't deallocate requests regardless of their source.
[in] | request | The MPI_Request to check for completion |
[out] | flag | Whether the request has completed or not |
[out] | status | The current status of the request |
|
static |
The same as testall but doesn't deallocate requests regardless of their source.
[in] | count | The number of requests in the array to check |
[in] | request | The MPI_Requests to check for completion |
[out] | flag | Whether all requests have completed or not |
[out] | status | The current status of all requests |
|
static |
The same as testany but doesn't deallocate requests regardless of their source.
[in] | count | The number of requests in the array to check |
[in] | request | The MPI_Requests to check for completion |
[out] | idx | The index of the first request in the array that is complete |
[out] | flag | Whether a request has completed or not |
[out] | status | The current status of all requests |
|
static |
Strongly typed wrapper around MPI_Gather().
TS | The pointer type for sendbuf |
TR | The pointer type for recvbuf |
[in] | sendbuf | The pointer to the sending buffer. |
[out] | recvbuf | The pointer to the receive buffer. |
[in] | recvcount | The number of values to receive. |
[in] | root | The rank recieving the data. |
[in] | comm | The MPI_Comm over which the gather operates. |
|
static |
Strongly typed wrapper around MPI_Gather().
TS | The pointer type for sendbuf |
TR | The pointer type for recvbuf |
[in] | sendbuf | The pointer to the sending buffer. |
[in] | sendcount | The number of values to send. |
[out] | recvbuf | The pointer to the receive buffer. |
[in] | recvcount | The number of values to receive. |
[in] | root | The rank recieving the data. |
[in] | comm | The MPI_Comm over which the gather operates. |
|
static |
Strongly typed wrapper around MPI_Gatherv.
TS | The pointer type for sendbuf |
TR | The pointer type for recvbuf |
[in] | sendbuf | The pointer to the sending buffer. |
[in] | sendcount | The number of values to send. |
[out] | recvbuf | The pointer to the receive buffer. |
[in] | recvcount | The number of values to receive. |
[in] | displs | integer array (of length group size). Entry i specifies the displacement relative to recvbuf at which to place the incoming data from process i (significant only at root). |
[in] | root | The rank recieving the data. |
[in] | comm | The MPI_Comm over which the gather operates. |
|
inlinestatic |
Returns an MPI_Op associated with our strongly typed Reduction enum.
[in] | op | The value of the Reduction enum to get an MPI_Op for. |
op
. Definition at line 868 of file MpiWrapper.hpp.
|
static |
Strongly typed wrapper around MPI_Irecv()
[out] | buf | The pointer to the buffer that contains the data to be received. |
[in] | count | The number of elements in buf |
[in] | source | The rank of the source process within comm . |
[in] | tag | The message tag that is be used to distinguish different types of messages |
[in] | comm | The handle to the MPI_Comm |
[out] | request | Pointer to the MPI_Request associated with this request. |
|
static |
Strongly typed wrapper around MPI_Isend()
[in] | buf | The pointer to the buffer that contains the data to be sent. |
[in] | count | The number of elements in buf . |
[in] | dest | The rank of the destination process within comm . |
[in] | tag | The message tag that is be used to distinguish different types of messages. |
[in] | comm | The handle to the MPI_Comm. |
[out] | request | Pointer to the MPI_Request associated with this request. |
|
static |
Convenience function for a MPI_Allreduce using a max-pair operation.
[in] | value | the value to send into the reduction. |
[out] | dst | The resulting values. |
value
across the ranks. Definition at line 1438 of file MpiWrapper.hpp.
|
static |
Convenience function for a MPI_Allreduce using a max-pair operation.
[in] | value | the value to send into the reduction. |
[out] | dst | The resulting values. |
value
across the ranks. Definition at line 1434 of file MpiWrapper.hpp.
|
static |
Convenience function for a MPI_Allreduce using a MPI_MAX operation.
[in] | value | the value to send into the reduction. |
[out] | dst | The resulting values. |
value
across the ranks. Definition at line 1368 of file MpiWrapper.hpp.
|
static |
Convenience function for a MPI_Allreduce using a MPI_MAX operation.
[in] | value | the value to send into the reduction. |
value
across the ranks. Definition at line 1362 of file MpiWrapper.hpp.
|
static |
Convenience function for a MPI_Allreduce using a min-pair operation.
[in] | value | the value to send into the reduction. |
[out] | dst | The resulting values. |
value
across the ranks. Definition at line 1430 of file MpiWrapper.hpp.
|
static |
Convenience function for a MPI_Allreduce using a min-pair operation.
[in] | value | the value to send into the reduction. |
[out] | dst | The resulting values. |
value
across the ranks. Definition at line 1426 of file MpiWrapper.hpp.
|
static |
Convenience function for a MPI_Allreduce using a MPI_MIN operation.
[in] | src | the value to send into the reduction. |
[out] | dst | The resulting values. |
value
across the ranks. Definition at line 1356 of file MpiWrapper.hpp.
|
static |
Convenience function for a MPI_Allreduce using a MPI_MIN operation.
value | the value to send into the reduction. |
value
across the ranks. Definition at line 1350 of file MpiWrapper.hpp.
|
static |
Compute the number of ranks allocated on the same node.
|
static |
Compute exclusive prefix sum and full sum.
T | type of local (rank) value |
U | type of global (sum) value |
[in] | value | the local value |
Definition at line 1275 of file MpiWrapper.hpp.
|
static |
Convenience wrapper for the MPI_Reduce function. Version for sequences.
T | type of data to reduce. Must correspond to a valid MPI_Datatype. |
src[in] | The values to send to the reduction. |
dst[out] | The resulting values (only significant at root). |
op | The Reduction enum to perform. |
comm | The communicator. |
Definition at line 1383 of file MpiWrapper.hpp.
|
static |
Convenience wrapper for the MPI_Reduce function.
T | type of data to reduce. Must correspond to a valid MPI_Datatype. |
value | The value to send to the reduction. |
op | The Reduction enum to perform. |
comm | The communicator. |
Definition at line 1375 of file MpiWrapper.hpp.
|
static |
Strongly typed wrapper around MPI_Reduce.
[in] | sendbuf | The pointer to the sending buffer. |
[out] | recvbuf | The pointer to the receive buffer (only significant at root). |
[in] | count | The number of values to send/receive. |
[in] | op | The MPI_Op to perform. |
[in] | comm | The MPI_Comm over which the gather operates. |
|
static |
Convenience function for a MPI_Allreduce using a MPI_SUM operation.
[in] | src | the value to send into the reduction. |
[out] | dst | The resulting values. |
value
across the ranks. Definition at line 1344 of file MpiWrapper.hpp.
|
static |
Convenience function for a MPI_Allreduce using a MPI_SUM operation.
[in] | value | the value to send into the reduction. |
value
across the ranks. Definition at line 1338 of file MpiWrapper.hpp.