|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Concrete communicator subclass based on MPI. More...
#include <Teuchos_DefaultMpiComm.hpp>

Static Public Attributes | |
| static int const | minTag_ = 26000 |
| static int const | maxTag_ = 26099 |
Private Member Functions | |
| void | setupMembersFromComm () |
| void | assertRank (const int rank, const std::string &rankName) const |
| MpiComm () | |
Private Attributes | |
| RCP< const OpaqueWrapper < MPI_Comm > > | rawMpiComm_ |
| int | rank_ |
| int | size_ |
| int | tag_ |
| RCP< const OpaqueWrapper < MPI_Errhandler > > | customErrorHandler_ |
| MPI error handler. If null, MPI uses the default error handler. | |
Static Private Attributes | |
| static int | tagCounter_ = MpiComm<Ordinal>::minTag_ |
Related Functions | |
(Note that these are not member functions.) | |
| template<typename Ordinal > | |
| RCP< MpiComm< Ordinal > > | createMpiComm (const RCP< const OpaqueWrapper< MPI_Comm > > &rawMpiComm) |
Helper function that creates a dynamically allocated MpiComm object or returns Teuchos::null to correctly represent a null communicator. | |
Constructors | |
| MpiComm (const RCP< const OpaqueWrapper< MPI_Comm > > &rawMpiComm) | |
| Construct given a wrapped MPI_Comm oqaque object. | |
| MpiComm (const MpiComm< Ordinal > &other) | |
| Construct a communicator with a new context with the same properties as the original. | |
| RCP< const OpaqueWrapper < MPI_Comm > > | getRawMpiComm () const |
Return the embedded wrapped opaque MPI_Comm object. | |
| void | setErrorHandler (const RCP< const OpaqueWrapper< MPI_Errhandler > > &errHandler) |
| Set the MPI error handler for this communicator. | |
Overridden from Comm | |
| virtual int | getRank () const |
| | |
| virtual int | getSize () const |
| | |
| virtual void | barrier () const |
| | |
| virtual void | broadcast (const int rootRank, const Ordinal bytes, char buffer[]) const |
| | |
| virtual void | gatherAll (const Ordinal sendBytes, const char sendBuffer[], const Ordinal recvBytes, char recvBuffer[]) const |
| | |
| virtual void | reduceAll (const ValueTypeReductionOp< Ordinal, char > &reductOp, const Ordinal bytes, const char sendBuffer[], char globalReducts[]) const |
| | |
| virtual void | reduceAllAndScatter (const ValueTypeReductionOp< Ordinal, char > &reductOp, const Ordinal sendBytes, const char sendBuffer[], const Ordinal recvCounts[], char myGlobalReducts[]) const |
| | |
| virtual void | scan (const ValueTypeReductionOp< Ordinal, char > &reductOp, const Ordinal bytes, const char sendBuffer[], char scanReducts[]) const |
| | |
| virtual void | send (const Ordinal bytes, const char sendBuffer[], const int destRank) const |
| | |
| virtual void | ssend (const Ordinal bytes, const char sendBuffer[], const int destRank) const |
| | |
| virtual int | receive (const int sourceRank, const Ordinal bytes, char recvBuffer[]) const |
| | |
| virtual void | readySend (const ArrayView< const char > &sendBuffer, const int destRank) const |
| | |
| virtual RCP< CommRequest > | isend (const ArrayView< const char > &sendBuffer, const int destRank) const |
| | |
| virtual RCP< CommRequest > | ireceive (const ArrayView< char > &Buffer, const int sourceRank) const |
| | |
| virtual void | waitAll (const ArrayView< RCP< CommRequest > > &requests) const |
| | |
| virtual void | waitAll (const ArrayView< RCP< CommRequest > > &requests, const ArrayView< RCP< CommStatus< Ordinal > > > &statuses) const |
| | |
| virtual RCP< CommStatus < Ordinal > > | wait (const Ptr< RCP< CommRequest > > &request) const |
| | |
| virtual RCP< Comm< Ordinal > > | duplicate () const |
| | |
| virtual RCP< Comm< Ordinal > > | split (const int color, const int key) const |
| | |
| virtual RCP< Comm< Ordinal > > | createSubcommunicator (const ArrayView< const int > &ranks) const |
| | |
Overridden from Describable | |
| std::string | description () const |
| | |
Concrete communicator subclass based on MPI.
Assertions:
getRawMpiComm().get()!=NULL && *getRawMpiComm()!=MPI_COMM_NULL getSize() > 0 0 <= getRank() && getRank() < getSize() ToDo: Finish documentation!
Definition at line 220 of file Teuchos_DefaultMpiComm.hpp.
| Teuchos::MpiComm< Ordinal >::MpiComm | ( | const RCP< const OpaqueWrapper< MPI_Comm > > & | rawMpiComm | ) |
Construct given a wrapped MPI_Comm oqaque object.
Preconditions:
rawMpiComm.get()!=NULL && *rawMpiComm != MPI_COMM_NULL Definition at line 436 of file Teuchos_DefaultMpiComm.hpp.
| Teuchos::MpiComm< Ordinal >::MpiComm | ( | const MpiComm< Ordinal > & | other | ) |
Construct a communicator with a new context with the same properties as the original.
The newly constructed communicator will have a duplicate communication space that has the same properties (e.g. processes, attributes, topologies) as the input communicator.
| other | The communicator to copy from. |
Preconditions:
other.getRawMpiComm().get() != NULL && *other.getRawMpiComm() != NULL Definition at line 480 of file Teuchos_DefaultMpiComm.hpp.
| Teuchos::MpiComm< Ordinal >::MpiComm | ( | ) | [private] |
| RCP<const OpaqueWrapper<MPI_Comm> > Teuchos::MpiComm< Ordinal >::getRawMpiComm | ( | ) | const [inline] |
Return the embedded wrapped opaque MPI_Comm object.
Definition at line 255 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::setErrorHandler | ( | const RCP< const OpaqueWrapper< MPI_Errhandler > > & | errHandler | ) |
Set the MPI error handler for this communicator.
MPI lets you set an error handler function specific to each communicator. MpiComm wraps this functionality. Create an error handler using MPI_Errhandler_create(), or use one of the default error handlers that the MPI standard or your MPI implementation provides. You will need to wrap the MPI error handler in an OpaqueWrapper first. (See the documentation of OpaqueWrapper for the rationale behind not using MPI's opaque objects directly.)
MpiComm will not attempt to call MPI_Errhandler_free() on the error handler you provide. You can always set the RCP's custom "deallocator" function to free the error handler, if you want it taken care of automatically.
| errHandler | [in] The error handler to set. If null, do nothing. |
Definition at line 508 of file Teuchos_DefaultMpiComm.hpp.
| int Teuchos::MpiComm< Ordinal >::getRank | ( | ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 527 of file Teuchos_DefaultMpiComm.hpp.
| int Teuchos::MpiComm< Ordinal >::getSize | ( | ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 534 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::barrier | ( | ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 541 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::broadcast | ( | const int | rootRank, |
| const Ordinal | bytes, | ||
| char | buffer[] | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 554 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::gatherAll | ( | const Ordinal | sendBytes, |
| const char | sendBuffer[], | ||
| const Ordinal | recvBytes, | ||
| char | recvBuffer[] | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 569 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::reduceAll | ( | const ValueTypeReductionOp< Ordinal, char > & | reductOp, |
| const Ordinal | bytes, | ||
| const char | sendBuffer[], | ||
| char | globalReducts[] | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 593 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::reduceAllAndScatter | ( | const ValueTypeReductionOp< Ordinal, char > & | reductOp, |
| const Ordinal | sendBytes, | ||
| const char | sendBuffer[], | ||
| const Ordinal | recvCounts[], | ||
| char | myGlobalReducts[] | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 622 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::scan | ( | const ValueTypeReductionOp< Ordinal, char > & | reductOp, |
| const Ordinal | bytes, | ||
| const char | sendBuffer[], | ||
| char | scanReducts[] | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 691 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::send | ( | const Ordinal | bytes, |
| const char | sendBuffer[], | ||
| const int | destRank | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 710 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::ssend | ( | const Ordinal | bytes, |
| const char | sendBuffer[], | ||
| const int | destRank | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 735 of file Teuchos_DefaultMpiComm.hpp.
| int Teuchos::MpiComm< Ordinal >::receive | ( | const int | sourceRank, |
| const Ordinal | bytes, | ||
| char | recvBuffer[] | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 786 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::readySend | ( | const ArrayView< const char > & | sendBuffer, |
| const int | destRank | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 759 of file Teuchos_DefaultMpiComm.hpp.
| RCP< CommRequest > Teuchos::MpiComm< Ordinal >::isend | ( | const ArrayView< const char > & | sendBuffer, |
| const int | destRank | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 818 of file Teuchos_DefaultMpiComm.hpp.
| RCP< CommRequest > Teuchos::MpiComm< Ordinal >::ireceive | ( | const ArrayView< char > & | Buffer, |
| const int | sourceRank | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 837 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::waitAll | ( | const ArrayView< RCP< CommRequest > > & | requests | ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1038 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::waitAll | ( | const ArrayView< RCP< CommRequest > > & | requests, |
| const ArrayView< RCP< CommStatus< Ordinal > > > & | statuses | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1050 of file Teuchos_DefaultMpiComm.hpp.
| RCP< CommStatus< Ordinal > > Teuchos::MpiComm< Ordinal >::wait | ( | const Ptr< RCP< CommRequest > > & | request | ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1074 of file Teuchos_DefaultMpiComm.hpp.
| RCP< Comm< Ordinal > > Teuchos::MpiComm< Ordinal >::duplicate | ( | ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1099 of file Teuchos_DefaultMpiComm.hpp.
| RCP< Comm< Ordinal > > Teuchos::MpiComm< Ordinal >::split | ( | const int | color, |
| const int | key | ||
| ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1107 of file Teuchos_DefaultMpiComm.hpp.
| RCP< Comm< Ordinal > > Teuchos::MpiComm< Ordinal >::createSubcommunicator | ( | const ArrayView< const int > & | ranks | ) | const [virtual] |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1133 of file Teuchos_DefaultMpiComm.hpp.
| std::string Teuchos::MpiComm< Ordinal >::description | ( | ) | const [virtual] |
Reimplemented from Teuchos::Describable.
Definition at line 1199 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::setupMembersFromComm | ( | ) | [private] |
Definition at line 495 of file Teuchos_DefaultMpiComm.hpp.
| void Teuchos::MpiComm< Ordinal >::assertRank | ( | const int | rank, |
| const std::string & | rankName | ||
| ) | const [private] |
Definition at line 1223 of file Teuchos_DefaultMpiComm.hpp.
| RCP< MpiComm< Ordinal > > createMpiComm | ( | const RCP< const OpaqueWrapper< MPI_Comm > > & | rawMpiComm | ) | [related] |
Helper function that creates a dynamically allocated MpiComm object or returns Teuchos::null to correctly represent a null communicator.
Postconditions: [rawMpiComm.get()!=NULL && *rawMpiComm!=MPI_COMM_NULL] return.get()!=NULL [rawMpiComm.get()==NULL || *rawMpiComm==MPI_COMM_NULL] return.get()==NULL
int const Teuchos::MpiComm< Ordinal >::minTag_ = 26000 [static] |
Definition at line 371 of file Teuchos_DefaultMpiComm.hpp.
int const Teuchos::MpiComm< Ordinal >::maxTag_ = 26099 [static] |
Definition at line 372 of file Teuchos_DefaultMpiComm.hpp.
int Teuchos::MpiComm< Ordinal >::tagCounter_ = MpiComm<Ordinal>::minTag_ [static, private] |
Definition at line 378 of file Teuchos_DefaultMpiComm.hpp.
RCP<const OpaqueWrapper<MPI_Comm> > Teuchos::MpiComm< Ordinal >::rawMpiComm_ [private] |
Definition at line 380 of file Teuchos_DefaultMpiComm.hpp.
int Teuchos::MpiComm< Ordinal >::rank_ [private] |
Definition at line 381 of file Teuchos_DefaultMpiComm.hpp.
int Teuchos::MpiComm< Ordinal >::size_ [private] |
Definition at line 382 of file Teuchos_DefaultMpiComm.hpp.
int Teuchos::MpiComm< Ordinal >::tag_ [private] |
Definition at line 383 of file Teuchos_DefaultMpiComm.hpp.
RCP<const OpaqueWrapper<MPI_Errhandler> > Teuchos::MpiComm< Ordinal >::customErrorHandler_ [private] |
MPI error handler. If null, MPI uses the default error handler.
Definition at line 386 of file Teuchos_DefaultMpiComm.hpp.
1.7.6.1