Wrappers of MPI library.
More...
|
| template<typename C > |
| MPI_Datatype | mpi_datatype () |
| | Template function for MPI Datatype.
|
| |
| template<> |
| MPI_Datatype | mpi_datatype< char > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< signed char > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< unsigned char > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< short > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< unsigned short > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< int > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< unsigned int > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< long int > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< unsigned long int > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< long long int > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< unsigned long long int > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< double > () |
| |
| template<> |
| MPI_Datatype | mpi_datatype< complex > () |
| |
| template<typename C > |
| C | allreduce_sum (C val, const MPI_Comm &comm) |
| | Calculate a summation over MPI communicator.
|
| |
| template<typename C > |
| std::vector< C > | allreduce_vec (const std::vector< C > &vec, const MPI_Comm &comm) |
| | Calculate a summation of each element of vector over MPI communicator.
|
| |
| template<typename C > |
| void | allreduce (const C *sendbuf, C *recvbuf, int count, MPI_Op op, const MPI_Comm &comm) |
| | Wrapper of MPI_Allreduce.
|
| |
| template<typename C > |
| void | sendrecv (const C *sendbuf, int sendcount, int dest, int sendtag, C *recvbuf, int recvcount, int source, int recvtag, const MPI_Comm &comm) |
| | Wrapper of MPI_Sendrecv.
|
| |
| template<typename C > |
| void | sendrecv (const std::vector< C > &send_vec, int dest, int sendtag, std::vector< C > &recv_vec, int source, int recvtag, const MPI_Comm &comm) |
| | Wrapper of MPI_Sendrecv for std::vector.
|
| |
| template<typename C > |
| void | alltoall (const C *sendbuf, int sendcount, C *recvbuf, int recvcount, const MPI_Comm &comm) |
| | Wrapper of MPI_Alltoall.
|
| |
| template<typename C > |
| void | alltoallv (const C *sendbuf, const int *sendcounts, const int *sdispls, C *recvbuf, const int *recvcounts, const int *rdispls, const MPI_Comm &comm) |
| | Wrapper of MPI_Alltoallv.
|
| |
| template<typename C > |
| void | bcast (C *buffer, int count, int root, const MPI_Comm &comm) |
| | Wrapper of MPI_Bcast.
|
| |
◆ allreduce()
Wrapper of MPI_Allreduce.
- Parameters
-
| [in] | sendbuf | send buffer |
| [out] | recvbuf | receive buffer |
| [in] | count | the number in send buffer |
| [in] | op | Opreation |
| [in] | comm | MPI Communicator |
◆ allreduce_sum()
Calculate a summation over MPI communicator.
- Parameters
-
| [in] | val | value to be summed. |
| [in] | comm | MPI communicator. |
- Returns
- summation of val.
◆ allreduce_vec()
| std::vector< C > mptensor::mpi_wrapper::allreduce_vec |
( |
const std::vector< C > & |
vec, |
|
|
const MPI_Comm & |
comm |
|
) |
| |
|
inline |
Calculate a summation of each element of vector over MPI communicator.
- Parameters
-
| [in] | vec | vector to be summed. |
| [in] | comm | MPI communicator. |
- Returns
- resulted vector.
◆ alltoall()
Wrapper of MPI_Alltoall.
- Parameters
-
| [in] | sendbuf | Starting address of send buffer. |
| [in] | sendcount | The number of elements to send. |
| [out] | recvbuf | Address of receive buffer. |
| [in] | recvcount | The number of elements to receive. |
| [in] | comm | Communicator over which data is to be exchanged. |
◆ alltoallv()
Wrapper of MPI_Alltoallv.
- Parameters
-
| [in] | sendbuf | Starting address of send buffer. |
| [in] | sendcounts | Integer array, where entry i specifies the number of elements to send to rank i. |
| [in] | sdispls | Integer array, where entry i specifies the displacement (offset from sendbuf, in units of sendtype) from which to send data to rank i. |
| [out] | recvbuf | Address of receive buffer. |
| [in] | recvcounts | Integer array, where entry j specifies the number of elements to receive from rank j. |
| [in] | rdispls | Integer array, where entry j specifies the displacement (offset from recvbuf, in units of recvtype) to which data from rank j should be written. |
| [in] | comm | Communicator over which data is to be exchanged. |
◆ bcast()
Wrapper of MPI_Bcast.
- Parameters
-
| buffer | Starting address of buffer. |
| count | Number of entries in buffer. |
| root | Rank of broadcast root. |
| comm | Communicator. |
◆ mpi_datatype()
Template function for MPI Datatype.
◆ mpi_datatype< char >()
◆ mpi_datatype< complex >()
◆ mpi_datatype< double >()
◆ mpi_datatype< int >()
◆ mpi_datatype< long int >()
◆ mpi_datatype< long long int >()
◆ mpi_datatype< short >()
◆ mpi_datatype< signed char >()
◆ mpi_datatype< unsigned char >()
◆ mpi_datatype< unsigned int >()
◆ mpi_datatype< unsigned long int >()
◆ mpi_datatype< unsigned long long int >()
◆ mpi_datatype< unsigned short >()
◆ sendrecv() [1/2]
Wrapper of MPI_Sendrecv.
- Parameters
-
| [in] | sendbuf | send buffer |
| [in] | sendcount | the number of elements to send |
| [in] | dest | Rank of destination |
| [in] | sendtag | Send tag |
| [out] | recvbuf | receive buffer |
| [in] | recvcount | the number of elements to receive |
| [in] | source | Rank of source |
| [in] | recvtag | Receive tag |
| [in] | comm | MPI Communicator |
◆ sendrecv() [2/2]
Wrapper of MPI_Sendrecv for std::vector.
- Parameters
-
| [in] | send_vec | send vector |
| [in] | dest | Rank of destination |
| [in] | sendtag | Send tag |
| [out] | recv_vec | receive vector |
| [in] | source | Rank of source |
| [in] | recvtag | Receive tag |
| [in] | comm | MPI Communicator |