|
| | Intracomm (const Intracomm &other) |
| | Intracomm (const MPI_Comm &comm, bool take_ownership_of_comm=true) |
| | Intracomm (const WorldInitObject &) |
| | ~Intracomm () |
| void | Abort (int code=1) const |
| void | Allreduce (const void *sendbuf, void *recvbuf, const int count, const MPI_Datatype datatype, const MPI_Op op) const |
| void | Barrier () const |
| void | Bcast (void *buf, size_t count, const MPI_Datatype datatype, const int root) const |
| void | binary_tree_info (int root, int &parent, int &child0, int &child1) |
| | Construct info about a binary tree with given root.
|
| Intracomm | Clone () const |
| Intracomm | Create (Group group) const |
| bool | Get_attr (int key, void *value) const |
| Group | Get_group () const |
| MPI_Comm & | Get_mpi_comm () const |
| int | Get_rank () const |
| int | Get_size () const |
| Request | Irecv (void *buf, const int count, const MPI_Datatype datatype, const int src, const int tag) const |
| Request | Irecv_bytes (void *buf, const std::size_t nbyte, const int src, const int tag) const |
| | Nonblocking receive of nbyte bytes; unlike Irecv() , nbyte may exceed INT_MAX.
|
| Request | Isend (const void *buf, const int count, const MPI_Datatype datatype, const int dest, const int tag) const |
| Request | Isend_bytes (const void *buf, const std::size_t nbyte, const int dest, const int tag, const bool sync=false) const |
| | Nonblocking send of nbyte bytes; unlike Isend() , nbyte may exceed INT_MAX.
|
| Request | Issend (const void *buf, const int count, const MPI_Datatype datatype, const int dest, const int tag) const |
| bool | operator== (const Intracomm &other) const |
| void | Recv (void *buf, const int count, const MPI_Datatype datatype, const int source, const int tag) const |
| void | Recv (void *buf, const int count, const MPI_Datatype datatype, const int source, const int tag, MPI_Status &status) const |
| void | Reduce (const void *sendbuf, void *recvbuf, const int count, const MPI_Datatype datatype, const MPI_Op op, const int root) const |
| void | Send (const void *buf, const int count, const MPI_Datatype datatype, int dest, int tag) const |
| Intracomm | Split (int Color, int Key=0) const |
| Intracomm | Split_type (int Type, int Key=0) const |
| int | unique_reserved_tag () |
| | Returns a unique tag reserved for long-term use (0<tag<1000).
|
| int | unique_tag () |
| | Returns a unique tag for temporary use (1023<tag<4095).
|
Wrapper around MPI_Comm. Has a shallow copy constructor; use Create(Get_group()) for deep copy.
| void SafeMPI::Intracomm::binary_tree_info |
( |
int | root, |
|
|
int & | parent, |
|
|
int & | child0, |
|
|
int & | child1 ) |
Construct info about a binary tree with given root.
Constructs a binary tree spanning the communicator with process root as the root of the tree. Returns the logical parent and children in the tree of the calling process. If there is no parent/child the value -1 will be set.
References Get_rank(), Get_size(), me, and np.
This collective operation creates a new Intracomm from an Intracomm::Group object. Must be called by all processes that belong to this communicator, but not all must use the same group . Thus this Intracomm can be partitioned into several Intracomm objects with one call.
- Parameters
-
- Returns
- a new Intracomm object
References Intracomm(), Intracomm(), SafeMPI::Group::group(), MADNESS_ASSERT, MADNESS_MPI_TEST, me, MPI_Comm_create(), MPI_Comm_rank(), MPI_Comm_size(), nproc, pimpl, and SAFE_MPI_GLOBAL_MUTEX.
Referenced by Clone(), test_mpi_group(), and test_multi_world().
| Request SafeMPI::Intracomm::Irecv_bytes |
( |
void * | buf, |
|
|
const std::size_t | nbyte, |
|
|
const int | src, |
|
|
const int | tag ) const |
|
inline |
Nonblocking receive of nbyte bytes; unlike Irecv() , nbyte may exceed INT_MAX.
The large-count function of MPI 4 ( MPI_Irecv_c ) or a derived datatype is used as in Isend_bytes() ; the sender need not have made the same choice.
- Note
- the size of the message received is Status::Get_byte_count() , which cannot report more than
INT_MAX bytes without MPI 4; the receiver should know the size
References SafeMPI::ByteCount::count(), SafeMPI::ByteCount::datatype(), Irecv(), MADNESS_ASSERT, MADNESS_MPI_TEST, SafeMPI::ByteCount::max_plain_count(), MPI_BYTE, pimpl, SAFE_MPI_GLOBAL_MUTEX, and SafeMPI::ByteCount::use_large_count().
| Request SafeMPI::Intracomm::Isend_bytes |
( |
const void * | buf, |
|
|
const std::size_t | nbyte, |
|
|
const int | dest, |
|
|
const int | tag, |
|
|
const bool | sync = false ) const |
|
inline |
Nonblocking send of nbyte bytes; unlike Isend() , nbyte may exceed INT_MAX.
Up to ByteCount::max_plain_count() bytes ( INT_MAX unless a test lowered it) are sent as Isend() sends them. More are given to the large-count function of MPI 4 ( MPI_Isend_c ) where MPI has it, and are otherwise described by a derived datatype (see ByteCount ).
- Parameters
-
| sync | if true, the send is synchronous ( MPI_Issend ) |
References SafeMPI::ByteCount::count(), SafeMPI::ByteCount::datatype(), Isend(), Issend(), MADNESS_ASSERT, MADNESS_MPI_TEST, SafeMPI::ByteCount::max_plain_count(), MPI_BYTE, pimpl, SAFE_MPI_GLOBAL_MUTEX, and SafeMPI::ByteCount::use_large_count().
| Intracomm SafeMPI::Intracomm::Split |
( |
int | Color, |
|
|
int | Key = 0 ) const |
|
inline |
This collective operation creates a new Intracomm using the MPI_Comm_split. Must be called by all processes that belong to this communicator. Each caller must provide Color of the new Intracomm and Key (this controls the rank within the new Intracomm; ties are broken by the rank in this Intracomm).
- Parameters
-
| Color | Specifies the new Intracomm that the calling process is to be assigned to. The value of color must be non-negative. If Color=UNDEFINED_COLOR then an uninitialized Intracomm object will be produced. |
| Key | The relative rank of the calling process in the group of the new Intracomm. If omitted, each communicator's ranks will be determined by the rank in the host communicator. |
- Returns
- a new Intracomm object
References Intracomm(), Intracomm(), MADNESS_ASSERT, MADNESS_MPI_TEST, me, MPI_COMM_NULL, MPI_Comm_rank(), MPI_Comm_size(), MPI_Comm_split(), nproc, pimpl, and SAFE_MPI_GLOBAL_MUTEX.
Referenced by create_worlds(), and test_multi_world().
| Intracomm SafeMPI::Intracomm::Split_type |
( |
int | Type, |
|
|
int | Key = 0 ) const |
|
inline |
This collective operation creates a new Intracomm using the MPI_Comm_split_type. Must be called by all processes that belong to this communicator. Each caller must provide the split type and Key (this controls the rank within the new Intracomm; ties are broken by the rank in this Intracomm).
- Parameters
-
| Type | Controls how this Intracomm will be split. The value can only be UNDEFINED_SPLIT_TYPE or SHARED_SPLIT_TYPE. If Type=UNDEFINED_SPLIT_TYPE then an uninitialized Intracomm object will be produced. |
| Key | The relative rank of the calling process in the group of the new Intracomm. If omitted, each communicator's ranks will be determined by the rank in the host communicator. |
- Returns
- a new Intracomm object
References Intracomm(), Intracomm(), MADNESS_ASSERT, MADNESS_MPI_TEST, me, MPI_COMM_NULL, MPI_Comm_rank(), MPI_Comm_size(), MPI_Comm_split_type(), MPI_Info_create(), MPI_Info_free(), nproc, pimpl, and SAFE_MPI_GLOBAL_MUTEX.
Referenced by madness::check_thread_binding(), and test_multi_world().
| int SafeMPI::Intracomm::unique_reserved_tag |
( |
| ) |
|
|
inline |
Returns a unique tag reserved for long-term use (0<tag<1000).
Get a tag from this routine for long-term/repeated use.
Tags in [1000,1023] are statically assigned.
References MADNESS_ASSERT, and pimpl.
| int SafeMPI::Intracomm::unique_tag |
( |
| ) |
|
|
inline |