MADNESS
version 0.9
|
Wrapper around MPI_Comm. Has a shallow copy constructor; use Create(Get_group()) for deep copy. More...
#include <safempi.h>
Public Member Functions | |
Intracomm (const WorldInitObject &) | |
Intracomm (const MPI_Comm &comm, bool take_ownership_of_comm=true) | |
Intracomm (const Intracomm &other) | |
~Intracomm () | |
Intracomm | Create (Group group) const |
bool | operator== (const Intracomm &other) const |
Group | Get_group () const |
MPI_Comm & | Get_mpi_comm () const |
int | Get_rank () const |
int | Get_size () const |
Request | Isend (const void *buf, const int count, const MPI_Datatype datatype, const int dest, const int tag) const |
Request | Irecv (void *buf, const int count, const MPI_Datatype datatype, const int src, const int tag) const |
void | Send (const void *buf, const int count, const MPI_Datatype datatype, int dest, 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 | Recv (void *buf, const int count, const MPI_Datatype datatype, const int source, const int tag) const |
void | Bcast (void *buf, size_t count, const MPI_Datatype datatype, const int root) const |
void | Reduce (const void *sendbuf, void *recvbuf, const int count, const MPI_Datatype datatype, const MPI_Op op, const int root) const |
void | Allreduce (const void *sendbuf, void *recvbuf, const int count, const MPI_Datatype datatype, const MPI_Op op) const |
bool | Get_attr (int key, void *value) const |
void | Abort (int code=1) const |
void | Barrier () const |
int | unique_tag () |
Returns a unique tag for temporary use (1023<tag<=4095) More... | |
int | unique_reserved_tag () |
Returns a unique tag reserved for long-term use (0<tag<1000) More... | |
void | binary_tree_info (int root, int &parent, int &child0, int &child1) |
Construct info about a binary tree with given root. More... | |
Friends | |
void | SafeMPI::detail::init_comm_world () |
int | Finalize () |
Analogous to MPI_Finalize. More... | |
Wrapper around MPI_Comm. Has a shallow copy constructor; use Create(Get_group()) for deep copy.
SafeMPI::Intracomm::Intracomm | ( | const WorldInitObject & | init | ) |
Referenced by madness::WorldMpiInterface::WorldMpiInterface().
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
References MPI_Abort().
Referenced by madness::error().
|
inline |
References MADNESS_MPI_TEST, MPI_Allreduce(), and SAFE_MPI_GLOBAL_MUTEX.
|
inline |
References MADNESS_MPI_TEST, MPI_Barrier(), and SAFE_MPI_GLOBAL_MUTEX.
Referenced by main().
|
inline |
References MADNESS_MPI_TEST, MPI_Bcast(), and SAFE_MPI_GLOBAL_MUTEX.
Referenced by madness::WorldMpiInterface::Bcast().
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(), np, and mpfr::root().
Referenced by madness::WorldGopInterface::broadcast(), and madness::WorldGopInterface::fence().
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.
group | Intracomm::Group describing the Intracomm object to be created (Intracomm::Get_group() and Intracomm::Group::Incl() ) |
References SafeMPI::Group::group(), MADNESS_MPI_TEST, MPI_Comm_create(), MPI_Comm_rank(), MPI_Comm_size(), and SAFE_MPI_GLOBAL_MUTEX.
|
inline |
References MADNESS_MPI_TEST, MPI_Comm_get_attr(), and SAFE_MPI_GLOBAL_MUTEX.
|
inline |
This local operation returns the Intracomm::Group object corresponding to this intracommunicator
References SAFE_MPI_GLOBAL_MUTEX.
Referenced by madness::WorldAmInterface::WorldAmInterface().
|
inline |
|
inline |
|
inline |
Referenced by binary_tree_info(), madness::WorldMpiInterface::nproc(), and madness::WorldMpiInterface::size().
|
inline |
References MADNESS_MPI_TEST, MPI_Irecv(), and SAFE_MPI_GLOBAL_MUTEX.
Referenced by madness::WorldMpiInterface::Irecv().
|
inline |
References MADNESS_MPI_TEST, MPI_Isend(), and SAFE_MPI_GLOBAL_MUTEX.
Referenced by madness::WorldMpiInterface::Isend().
|
inline |
|
inline |
References MADNESS_MPI_TEST, MPI_Recv(), and SAFE_MPI_GLOBAL_MUTEX.
Referenced by madness::WorldMpiInterface::Recv().
|
inline |
References MADNESS_MPI_TEST, MPI_Recv(), MPI_STATUS_IGNORE, and SAFE_MPI_GLOBAL_MUTEX.
|
inline |
References MADNESS_MPI_TEST, MPI_Reduce(), and SAFE_MPI_GLOBAL_MUTEX.
|
inline |
References MADNESS_MPI_TEST, MPI_Send(), and SAFE_MPI_GLOBAL_MUTEX.
Referenced by madness::WorldMpiInterface::Send().
|
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.
|
inline |
Returns a unique tag for temporary use (1023<tag<=4095)
These tags are intended for one time use to avoid tag collisions with other messages around the same time period. It simply increments/wraps a counter and returns the next legal value.
So that send and receiver agree on the tag all processes need to call this routine in the same sequence.
Referenced by madness::WorldGopInterface::broadcast(), madness::WorldGopInterface::fence(), and madness::archive::ArchiveStoreImpl< ParallelOutputArchive, WorldContainer< keyT, valueT > >::store().
|
friend |
Analogous to MPI_Finalize.
This returns status rather than throw an exception upon failure because this is a "destructor", and throwing from destructors is evil.
|
friend |