|
SIRIUS 7.5.0
Electronic structure library and applications
|
MPI communicator wrapper. More...
#include <communicator.hpp>
Public Member Functions | |
| Communicator () | |
| Default constructor. More... | |
| Communicator (MPI_Comm mpi_comm__) | |
| Constructor for existing communicator. More... | |
| Communicator (std::shared_ptr< MPI_Comm > comm__) | |
| Constructor for new communicator. More... | |
| void | abort (int errcode__) const |
| Communicator | cart_create (int ndims__, int const *dims__, int const *periods__) const |
| Communicator | cart_sub (int const *remain_dims__) const |
| Communicator | split (int color__) const |
| Communicator | duplicate () const |
| MPI_Comm | native () const |
| Return the native raw MPI communicator handler. More... | |
| int | rank () const |
| Rank of MPI process inside communicator. More... | |
| int | size () const |
| Size of the communicator (number of ranks). More... | |
| int | cart_rank (std::vector< int > const &coords__) const |
| Rank of MPI process inside communicator with associated Cartesian partitioning. More... | |
| bool | is_null () const |
| void | barrier () const |
| template<typename T , op_t mpi_op__ = op_t::sum> | |
| void | reduce (T *buffer__, int count__, int root__) const |
| template<typename T , op_t mpi_op__ = op_t::sum> | |
| void | reduce (T *buffer__, int count__, int root__, MPI_Request *req__) const |
| template<typename T , op_t mpi_op__ = op_t::sum> | |
| void | reduce (T const *sendbuf__, T *recvbuf__, int count__, int root__) const |
| template<typename T , op_t mpi_op__ = op_t::sum> | |
| void | reduce (T const *sendbuf__, T *recvbuf__, int count__, int root__, MPI_Request *req__) const |
| template<typename T , op_t mpi_op__ = op_t::sum> | |
| void | allreduce (T *buffer__, int count__) const |
| Perform the in-place (the output buffer is used as the input buffer) all-to-all reduction. More... | |
| template<typename T , op_t op__ = op_t::sum> | |
| void | allreduce (std::vector< T > &buffer__) const |
| Perform the in-place (the output buffer is used as the input buffer) all-to-all reduction. More... | |
| template<typename T , op_t mpi_op__ = op_t::sum> | |
| void | iallreduce (T *buffer__, int count__, MPI_Request *req__) const |
| template<typename T > | |
| void | bcast (T *buffer__, int count__, int root__) const |
| Perform buffer broadcast. More... | |
| void | bcast (std::string &str__, int root__) const |
| template<typename T > | |
| void | allgather (T *buffer__, int const *recvcounts__, int const *displs__) const |
| In-place MPI_Allgatherv. More... | |
| template<typename T > | |
| void | allgather (T const *sendbuf__, int sendcount__, T *recvbuf__, int const *recvcounts__, int const *displs__) const |
| Out-of-place MPI_Allgatherv. More... | |
| template<typename T > | |
| void | allgather (T const *sendbuf__, T *recvbuf__, int count__, int displs__) const |
| template<typename T > | |
| void | allgather (T *buffer__, int count__, int displs__) const |
| In-place MPI_Allgatherv. More... | |
| template<typename T > | |
| void | send (T const *buffer__, int count__, int dest__, int tag__) const |
| template<typename T > | |
| Request | isend (T const *buffer__, int count__, int dest__, int tag__) const |
| template<typename T > | |
| void | recv (T *buffer__, int count__, int source__, int tag__) const |
| template<typename T > | |
| Request | irecv (T *buffer__, int count__, int source__, int tag__) const |
| template<typename T > | |
| void | gather (T const *sendbuf__, T *recvbuf__, int const *recvcounts__, int const *displs__, int root__) const |
| template<typename T > | |
| void | gather (T const *sendbuf__, T *recvbuf__, int offset__, int count__, int root__) const |
| Gather data on a given rank. More... | |
| template<typename T > | |
| void | scatter (T const *sendbuf__, T *recvbuf__, int const *sendcounts__, int const *displs__, int root__) const |
| template<typename T > | |
| void | alltoall (T const *sendbuf__, int sendcounts__, T *recvbuf__, int recvcounts__) const |
| template<typename T > | |
| void | alltoall (T const *sendbuf__, int const *sendcounts__, int const *sdispls__, T *recvbuf__, int const *recvcounts__, int const *rdispls__) const |
Static Public Member Functions | |
| static void | initialize (int required__) |
| MPI initialization. More... | |
| static void | finalize () |
| MPI shut down. More... | |
| static bool | is_finalized () |
| static Communicator const & | self () |
| static Communicator const & | world () |
| static Communicator const & | null () |
| static Communicator const & | map_fcomm (int fcomm__) |
| Mapping between Fortran and SIRIUS MPI communicators. More... | |
| static int | get_tag (int i__, int j__) |
| static std::string | processor_name () |
Private Member Functions | |
| void | init () |
Private Attributes | |
| MPI_Comm | mpi_comm_raw_ {MPI_COMM_NULL} |
| Raw MPI communicator. More... | |
| std::shared_ptr< MPI_Comm > | mpi_comm_ |
| Smart pointer to allocated MPI communicator. More... | |
| int | rank_ {-1} |
| Store communicator's rank. More... | |
| int | size_ {-1} |
| Store communicator's size. More... | |
MPI communicator wrapper.
Definition at line 240 of file communicator.hpp.
|
inline |
Default constructor.
Definition at line 261 of file communicator.hpp.
|
inlineexplicit |
Constructor for existing communicator.
Definition at line 266 of file communicator.hpp.
|
inlineexplicit |
Constructor for new communicator.
Definition at line 273 of file communicator.hpp.
|
inlineprivate |
Definition at line 252 of file communicator.hpp.
|
inlinestatic |
MPI initialization.
Definition at line 281 of file communicator.hpp.
|
inlinestatic |
MPI shut down.
Definition at line 295 of file communicator.hpp.
|
inlinestatic |
Definition at line 300 of file communicator.hpp.
|
inlinestatic |
Definition at line 307 of file communicator.hpp.
|
inlinestatic |
Definition at line 313 of file communicator.hpp.
|
inlinestatic |
Definition at line 319 of file communicator.hpp.
|
inline |
Definition at line 325 of file communicator.hpp.
|
inline |
Definition at line 330 of file communicator.hpp.
|
inline |
Definition at line 337 of file communicator.hpp.
|
inline |
Definition at line 344 of file communicator.hpp.
|
inline |
Definition at line 351 of file communicator.hpp.
|
inlinestatic |
Mapping between Fortran and SIRIUS MPI communicators.
Definition at line 359 of file communicator.hpp.
|
inline |
Return the native raw MPI communicator handler.
Definition at line 371 of file communicator.hpp.
|
inlinestatic |
Definition at line 376 of file communicator.hpp.
|
inlinestatic |
Definition at line 384 of file communicator.hpp.
|
inline |
Rank of MPI process inside communicator.
Definition at line 393 of file communicator.hpp.
|
inline |
Size of the communicator (number of ranks).
Definition at line 399 of file communicator.hpp.
|
inline |
Rank of MPI process inside communicator with associated Cartesian partitioning.
Definition at line 405 of file communicator.hpp.
|
inline |
Definition at line 416 of file communicator.hpp.
|
inline |
Definition at line 421 of file communicator.hpp.
|
inline |
Definition at line 431 of file communicator.hpp.
|
inline |
Definition at line 443 of file communicator.hpp.
|
inline |
Definition at line 455 of file communicator.hpp.
|
inline |
Definition at line 462 of file communicator.hpp.
|
inline |
Perform the in-place (the output buffer is used as the input buffer) all-to-all reduction.
Definition at line 470 of file communicator.hpp.
|
inline |
Perform the in-place (the output buffer is used as the input buffer) all-to-all reduction.
Definition at line 478 of file communicator.hpp.
|
inline |
Definition at line 484 of file communicator.hpp.
|
inline |
Perform buffer broadcast.
Definition at line 495 of file communicator.hpp.
|
inline |
Definition at line 503 of file communicator.hpp.
|
inline |
In-place MPI_Allgatherv.
Definition at line 522 of file communicator.hpp.
|
inline |
Out-of-place MPI_Allgatherv.
Definition at line 534 of file communicator.hpp.
|
inline |
Definition at line 545 of file communicator.hpp.
|
inline |
In-place MPI_Allgatherv.
Definition at line 569 of file communicator.hpp.
|
inline |
Definition at line 589 of file communicator.hpp.
|
inline |
Definition at line 598 of file communicator.hpp.
|
inline |
Definition at line 609 of file communicator.hpp.
|
inline |
Definition at line 619 of file communicator.hpp.
|
inline |
Definition at line 630 of file communicator.hpp.
|
inline |
Gather data on a given rank.
Definition at line 643 of file communicator.hpp.
|
inline |
Definition at line 668 of file communicator.hpp.
|
inline |
Definition at line 679 of file communicator.hpp.
|
inline |
Definition at line 689 of file communicator.hpp.
|
private |
Raw MPI communicator.
Definition at line 244 of file communicator.hpp.
|
private |
Smart pointer to allocated MPI communicator.
Definition at line 246 of file communicator.hpp.
|
private |
Store communicator's rank.
Definition at line 248 of file communicator.hpp.
|
private |
Store communicator's size.
Definition at line 250 of file communicator.hpp.