|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Implementation of Comm that uses MPI for communication. More...
#include <Teuchos_DefaultMpiComm.hpp>

Public Member Functions | |
| int | getTag () const |
| The current tag. More... | |
Public Member Functions inherited from Teuchos::Comm< Ordinal > | |
| virtual | ~Comm () |
| Destructor, declared virtual for safety of derived classes. More... | |
Public Member Functions inherited from Teuchos::Describable | |
| virtual void | describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
| Print the object with some verbosity level to a FancyOStream. More... | |
| void | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
| Version of describe() that takes an std::ostream instead of a FancyOStream. More... | |
| virtual | ~Describable () |
| Destructor (marked virtual for memory safety of derived classes). More... | |
Public Member Functions inherited from Teuchos::LabeledObject | |
| LabeledObject () | |
| Construct with an empty label. More... | |
| virtual | ~LabeledObject () |
| virtual void | setObjectLabel (const std::string &objectLabel) |
| Set the object label (see LabeledObject). More... | |
| virtual std::string | getObjectLabel () const |
| Get the object label (see LabeledObject). More... | |
Static Public Attributes | |
| static int const | minTag_ = 26000 |
| static int const | maxTag_ = 26099 |
Static Public Attributes inherited from Teuchos::Describable | |
| static const EVerbosityLevel | verbLevel_default = VERB_DEFAULT |
Default value for the verbLevel argument of describe(). More... | |
Private Member Functions | |
| void | setupMembersFromComm () |
| void | assertRank (const int rank, const std::string &rankName) const |
| MpiComm () | |
Private Attributes | |
| RCP< const OpaqueWrapper< MPI_Comm > > | rawMpiComm_ |
| The "raw" MPI_Comm (communicator). More... | |
| int | rank_ |
| The rank of the calling process. More... | |
| int | size_ |
| The number of processes in the communicator. More... | |
| int | tag_ |
| The current tag, to use for all MPI functions that need it. More... | |
| RCP< const OpaqueWrapper< MPI_Errhandler > > | customErrorHandler_ |
| MPI error handler. If null, MPI uses the default error handler. More... | |
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. More... | |
Related Functions inherited from Teuchos::Comm< Ordinal > | |
| template<typename Ordinal > | |
| int | rank (const Comm< Ordinal > &comm) |
| Get the process rank. More... | |
| template<typename Ordinal > | |
| int | size (const Comm< Ordinal > &comm) |
| Get the number of processes in the communicator. More... | |
| template<typename Ordinal > | |
| void | barrier (const Comm< Ordinal > &comm) |
| Barrier. More... | |
| template<typename Ordinal , typename Packet > | |
| void | broadcast (const Comm< Ordinal > &comm, const int rootRank, const Ordinal count, Packet buffer[]) |
| Broadcast array of objects that use value semantics. More... | |
| template<typename Ordinal , typename Packet > | |
| void | broadcast (const Comm< Ordinal > &comm, const int rootRank, const ArrayView< Packet > &buffer) |
| Broadcast array of objects that use value semantics. More... | |
| template<typename Ordinal , typename Packet > | |
| void | broadcast (const Comm< Ordinal > &comm, const int rootRank, Packet *object) |
| Broadcast single object that use value semantics. More... | |
| template<typename Ordinal , typename Packet > | |
| void | broadcast (const Comm< Ordinal > &comm, const int rootRank, const Ptr< Packet > &object) |
| Broadcast single object that use value semantics. More... | |
| template<typename Ordinal , typename Packet > | |
| void | broadcast (const Comm< Ordinal > &comm, const Serializer< Ordinal, Packet > &serializer, const int rootRank, const Ordinal count, Packet *const buffer[]) |
| Broadcast array of objects that use reference semantics. More... | |
| template<typename Ordinal , typename Packet > | |
| void | broadcast (const Comm< Ordinal > &comm, const Serializer< Ordinal, Packet > &serializer, const int rootRank, const ArrayView< const Ptr< Packet > > &buffer) |
| Broadcast array of objects that use reference semantics. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| void | broadcast (const Comm< Ordinal > &comm, const Serializer &serializer, const int rootRank, const Ordinal count, Packet buffer[]) |
| Broadcast array of objects that use value semantics using customized serializer. More... | |
| template<typename Ordinal , typename Packet > | |
| void | gather (const Packet sendBuf[], const Ordinal sendCount, Packet recvBuf[], const Ordinal recvCount, const int root, const Comm< Ordinal > &comm) |
| Gather values from each process to the root process. More... | |
| template<typename Ordinal , typename Packet > | |
| void | gatherv (const Packet sendBuf[], const Ordinal sendCount, Packet recvBuf[], const Ordinal recvCounts[], const Ordinal displs[], const int root, const Comm< Ordinal > &comm) |
| Gather arrays of possibly different lengths from each process to the root process. More... | |
| template<typename Ordinal , typename Packet > | |
| void | gatherAll (const Comm< Ordinal > &comm, const Ordinal sendCount, const Packet sendBuffer[], const Ordinal recvCount, Packet recvBuffer[]) |
| Gather array of objects that use value semantics from every process to every process. More... | |
| template<typename Ordinal , typename Packet > | |
| void | gatherAll (const Comm< Ordinal > &comm, const Serializer< Ordinal, Packet > &serializer, const Ordinal sendCount, const Packet *const sendBuffer[], const Ordinal recvCount, Packet *const recvBuffer[]) |
| Gather array of objects that use reference semantics from every process to every process. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| void | gatherAll (const Comm< Ordinal > &comm, const Serializer &serializer, const Ordinal sendCount, const Packet sendBuffer[], const Ordinal recvCount, Packet recvBuffer[]) |
| Gather array of objects that use value semantics from every process to every process using customized serializer. More... | |
| template<typename Ordinal , typename Packet > | |
| void | reduceAll (const Comm< Ordinal > &comm, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet sendBuffer[], Packet globalReducts[]) |
| Collective reduce all of array of objects using value semantics using a user-defined reduction operator. More... | |
| template<typename Ordinal , typename Packet > | |
| void | reduceAll (const Comm< Ordinal > &comm, const EReductionType reductType, const Ordinal count, const Packet sendBuffer[], Packet globalReducts[]) |
| Collective reduce all of array of objects using value semantics using a pre-defined reduction type. More... | |
| template<typename Ordinal , typename Packet > | |
| void | reduceAll (const Comm< Ordinal > &comm, const EReductionType reductType, const Packet &send, const Ptr< Packet > &globalReduct) |
| Collective reduce all for single object using value semantics using a pre-defined reduction type. More... | |
| template<typename Ordinal , typename Packet > | |
| void | reduceAll (const Comm< Ordinal > &comm, const Serializer< Ordinal, Packet > &serializer, const ReferenceTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet *const sendBuffer[], Packet *const globalReducts[]) |
| Collective reduce all for array of objects using reference semantics. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| void | reduceAll (const Comm< Ordinal > &comm, const Serializer &serializer, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet sendBuffer[], Packet globalReducts[]) |
| Collective reduce all of array of objects using value semantics using a user-defined reduction operator and customized serializer. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| void | reduceAll (const Comm< Ordinal > &comm, const Serializer &serializer, const EReductionType reductType, const Ordinal count, const Packet sendBuffer[], Packet globalReducts[]) |
| Collective reduce all of array of objects using value semantics using a pre-defined reduction type and customized serializer. More... | |
| template<typename Ordinal , typename Packet > | |
| void | reduceAllAndScatter (const Comm< Ordinal > &comm, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal sendCount, const Packet sendBuffer[], const Ordinal recvCounts[], Packet myGlobalReducts[]) |
| Reduce and Scatter array of objects that use value semantics using a user-defined reduction object. More... | |
| template<typename Ordinal , typename Packet > | |
| void | reduceAllAndScatter (const Comm< Ordinal > &comm, const EReductionType reductType, const Ordinal sendCount, const Packet sendBuffer[], const Ordinal recvCounts[], Packet myGlobalReducts[]) |
| Reduce and Scatter array of objects that use value semantics using a a pre-defined reduction type. More... | |
| template<typename Ordinal , typename Packet > | |
| void | reduceAllAndScatter (const Comm< Ordinal > &comm, const Serializer< Ordinal, Packet > &serializer, const ReferenceTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal sendCount, const Packet *const sendBuffer[], const Ordinal recvCounts[], Packet *const myGlobalReducts[]) |
| Reduce and Scatter array of objects that use reference semantics using a user-defined reduction object. More... | |
| template<typename Ordinal , typename Packet > | |
| void | scan (const Comm< Ordinal > &comm, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet sendBuffer[], Packet scanReducts[]) |
| Scan/Reduce array of objects that use value semantics using a user-defined reduction operator. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| void | reduceAllAndScatter (const Comm< Ordinal > &comm, const Serializer &serializer, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal sendCount, const Packet sendBuffer[], const Ordinal recvCounts[], Packet myGlobalReducts[]) |
| Reduce and Scatter array of objects that use value semantics using a user-defined reduction object and customized serializer. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| void | reduceAllAndScatter (const Comm< Ordinal > &comm, const Serializer &serializer, const EReductionType reductType, const Ordinal sendCount, const Packet sendBuffer[], const Ordinal recvCounts[], Packet myGlobalReducts[]) |
| Reduce and Scatter array of objects that use value semantics using a a pre-defined reduction type and customized serializer. More... | |
| template<typename Ordinal , typename Packet > | |
| void | scan (const Comm< Ordinal > &comm, const EReductionType reductType, const Ordinal count, const Packet sendBuffer[], Packet scanReducts[]) |
| Scan/Reduce array of objects using value semantics using a predefined reduction type. More... | |
| template<typename Ordinal , typename Packet > | |
| void | scan (const Comm< Ordinal > &comm, const EReductionType reductType, const Packet &send, const Ptr< Packet > &scanReduct) |
| Scan/Reduce single object using value semantics using a predefined reduction type. More... | |
| template<typename Ordinal , typename Packet > | |
| void | scan (const Comm< Ordinal > &comm, const Serializer< Ordinal, Packet > &serializer, const ReferenceTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet *const sendBuffer[], Packet *const scanReducts[]) |
| Scan/Reduce array of objects that use reference semantics using a user-defined reduction operator. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| void | scan (const Comm< Ordinal > &comm, const Serializer &serializer, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet sendBuffer[], Packet scanReducts[]) |
| Scan/Reduce array of objects that use value semantics using a user-defined reduction operator and customized serializer. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| void | scan (const Comm< Ordinal > &comm, const Serializer &serializer, const EReductionType reductType, const Ordinal count, const Packet sendBuffer[], Packet scanReducts[]) |
| Scan/Reduce array of objects using value semantics using a predefined reduction type and customized serializer. More... | |
| template<typename Ordinal , typename Packet > | |
| void | send (const Comm< Ordinal > &comm, const Ordinal count, const Packet sendBuffer[], const int destRank) |
| Send objects that use values semantics to another process. More... | |
| template<typename Ordinal , typename Packet > | |
| void | ssend (const Comm< Ordinal > &comm, const Ordinal count, const Packet sendBuffer[], const int destRank) |
| Synchronously send objects that use values semantics to another process. More... | |
| template<typename Ordinal , typename Packet > | |
| void | send (const Comm< Ordinal > &comm, const Packet &send, const int destRank) |
| Send a single object that use values semantics to another process. More... | |
| template<typename Ordinal , typename Packet > | |
| void | ssend (const Comm< Ordinal > &comm, const Packet &send, const int destRank) |
| Synchronously send a single object that use values semantics to another process. More... | |
| template<typename Ordinal , typename Packet > | |
| void | send (const Comm< Ordinal > &comm, const Serializer< Ordinal, Packet > &serializer, const Ordinal count, const Packet *const sendBuffer[], const int destRank) |
| Send objects that use reference semantics to another process. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| void | send (const Comm< Ordinal > &comm, const Serializer &serializer, const Ordinal count, const Packet sendBuffer[], const int destRank) |
| Send objects that use values semantics to another process using customized serializer. More... | |
| template<typename Ordinal , typename Packet > | |
| int | receive (const Comm< Ordinal > &comm, const int sourceRank, const Ordinal count, Packet recvBuffer[]) |
| Receive objects that use values semantics from another process. More... | |
| template<typename Ordinal , typename Packet > | |
| int | receive (const Comm< Ordinal > &comm, const int sourceRank, Packet *recv) |
| Receive a single object that use values semantics from another process. More... | |
| template<typename Ordinal , typename Packet > | |
| int | receive (const Comm< Ordinal > &comm, const Serializer< Ordinal, Packet > &serializer, const int sourceRank, const Ordinal count, Packet *const recvBuffer[]) |
| Receive objects that use reference semantics from another process. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| int | receive (const Comm< Ordinal > &comm, const Serializer &serializer, const int sourceRank, const Ordinal count, Packet recvBuffer[]) |
| Receive objects that use values semantics from another process using customized serializer. More... | |
| template<typename Ordinal , typename Packet > | |
| void | readySend (const Comm< Ordinal > &comm, const ArrayView< const Packet > &sendBuffer, const int destRank) |
| Ready-Send an array of objects that use values semantics to another process. More... | |
| template<typename Ordinal , typename Packet > | |
| void | readySend (const Comm< Ordinal > &comm, const Packet &send, const int destRank) |
| Ready-Send a single object that use values semantics to another process. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| void | readySend (const Comm< Ordinal > &comm, const Serializer &serializer, const ArrayView< const Packet > &sendBuffer, const int destRank) |
| Ready-Send an array of objects that use values semantics to another process using customized serializer. More... | |
| template<typename Ordinal , typename Packet > | |
| RCP< CommRequest< Ordinal > > | isend (const Comm< Ordinal > &comm, const ArrayRCP< const Packet > &sendBuffer, const int destRank) |
| Send objects that use values semantics to another process. More... | |
| template<typename Ordinal , typename Packet > | |
| RCP< CommRequest< Ordinal > > | isend (const Comm< Ordinal > &comm, const RCP< const Packet > &send, const int destRank) |
| Send a single object that use values semantics to another process. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| RCP< CommRequest< Ordinal > > | isend (const Comm< Ordinal > &comm, const Serializer &serializer, const ArrayRCP< const Packet > &sendBuffer, const int destRank) |
| Send objects that use values semantics to another process using customized serializer. More... | |
| template<typename Ordinal , typename Packet > | |
| RCP< CommRequest< Ordinal > > | ireceive (const Comm< Ordinal > &comm, const ArrayRCP< Packet > &recvBuffer, const int sourceRank) |
| Receive one or more objects (that use values semantics) from another process. More... | |
| template<typename Ordinal , typename Packet > | |
| RCP< CommRequest< Ordinal > > | ireceive (const Comm< Ordinal > &comm, const RCP< Packet > &recv, const int sourceRank) |
| Receive one object (that uses values semantics) from another process. More... | |
| template<typename Ordinal , typename Packet , typename Serializer > | |
| RCP< CommRequest< Ordinal > > | ireceive (const Comm< Ordinal > &comm, const Serializer &serializer, const ArrayRCP< Packet > &recvBuffer, const int sourceRank) |
| Send objects that use values semantics to another process using customized serializer. More... | |
| template<typename Ordinal > | |
| void | waitAll (const Comm< Ordinal > &comm, const ArrayView< RCP< CommRequest< Ordinal > > > &requests) |
| Wait for an array of Teuchos::CommRequest objects. More... | |
| template<typename Ordinal > | |
| void | waitAll (const Comm< Ordinal > &comm, const ArrayView< RCP< CommRequest< Ordinal > > > &requests, const ArrayView< RCP< CommStatus< Ordinal > > > &statuses) |
| Wait on one or more communication requests, and return their statuses. More... | |
| template<typename Ordinal > | |
| RCP< CommStatus< Ordinal > > | wait (const Comm< Ordinal > &comm, const Ptr< RCP< CommRequest< Ordinal > > > &request) |
| Wait on a single communication request, and return its status. More... | |
Related Functions inherited from Teuchos::Describable | |
| DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
| Describable output stream manipulator. More... | |
| std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
| Output stream operator for Describable manipulator. More... | |
Constructors | |
| MpiComm (MPI_Comm rawMpiComm) | |
| Construct an MpiComm with an MPI_Comm. More... | |
| MpiComm (const RCP< const OpaqueWrapper< MPI_Comm > > &rawMpiComm) | |
| Construct an MpiComm with the given wrapped MPI_Comm. More... | |
| MpiComm (const MpiComm< Ordinal > &other) | |
| Construct a communicator with a new context with the same properties as the original. More... | |
| RCP< const OpaqueWrapper< MPI_Comm > > | getRawMpiComm () const |
Return the embedded wrapped opaque MPI_Comm object. More... | |
| void | setErrorHandler (const RCP< const OpaqueWrapper< MPI_Errhandler > > &errHandler) |
| Set the MPI error handler for this communicator. More... | |
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 | gather (const Ordinal sendBytes, const char sendBuffer[], const Ordinal recvBytes, char recvBuffer[], const int root) const |
| Gather values from all processes to the root process. More... | |
| 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 | send (const Ordinal bytes, const char sendBuffer[], const int destRank, const int tag) const |
| virtual void | ssend (const Ordinal bytes, const char sendBuffer[], const int destRank) const |
| virtual void | ssend (const Ordinal bytes, const char sendBuffer[], const int destRank, const int tag) const |
| Variant of ssend() that takes a message tag. More... | |
| 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 void | readySend (const Ordinal bytes, const char sendBuffer[], const int destRank, const int tag) const |
| Variant of readySend() that accepts a message tag. More... | |
| virtual RCP< CommRequest< Ordinal > > | isend (const ArrayView< const char > &sendBuffer, const int destRank) const |
| virtual RCP< CommRequest< Ordinal > > | isend (const ArrayView< const char > &sendBuffer, const int destRank, const int tag) const |
| Variant of isend() that takes a tag. More... | |
| virtual RCP< CommRequest< Ordinal > > | ireceive (const ArrayView< char > &Buffer, const int sourceRank) const |
| virtual RCP< CommRequest< Ordinal > > | ireceive (const ArrayView< char > &Buffer, const int sourceRank, const int tag) const |
| virtual void | waitAll (const ArrayView< RCP< CommRequest< Ordinal > > > &requests) const |
| virtual void | waitAll (const ArrayView< RCP< CommRequest< Ordinal > > > &requests, const ArrayView< RCP< CommStatus< Ordinal > > > &statuses) const |
| virtual RCP< CommStatus< Ordinal > > | wait (const Ptr< RCP< CommRequest< Ordinal > > > &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 |
Implementation of Comm that uses MPI for communication.
| Ordinal | The index type for communication; same as the template parameter of Comm. |
This class uses MPI (the Message Passing Interface) to implement the Comm interface. It includes constructors that take an MPI_Comm from the application.
Assertions:
getRawMpiComm().get() != NULL*getRawMpiComm() != MPI_COMM_NULLgetSize() > 00 <= getRank() && getRank() < getSize() Definition at line 373 of file Teuchos_DefaultMpiComm.hpp.
|
explicit |
Construct an MpiComm with an MPI_Comm.
This constructs an MpiComm that uses the given "raw" MPI communicator underneath. The MPI_Comm must be valid for the lifetime of this MpiComm. You are responsible for freeing the MPI_Comm (using MPI_Comm_free) if necessary.
This constructor should be used only in one of two cases:
If you cannot be sure of either of these two conditions, you should use the version of the constructor that takes an RCP<const OpaqueWrapper<MPI_Comm> >.
Precondition:
rawMpiComm != MPI_COMM_NULL Definition at line 722 of file Teuchos_DefaultMpiComm.hpp.
| Teuchos::MpiComm< Ordinal >::MpiComm | ( | const RCP< const OpaqueWrapper< MPI_Comm > > & | rawMpiComm | ) |
Construct an MpiComm with the given wrapped MPI_Comm.
This constructs an MpiComm that uses the given "raw" MPI communicator underneath. This version of the constructor accepts the MPI_Comm wrapped in an OpaqueWrapper, which along with the RCP has the option to free the MPI_Comm (via MPI_Comm_free) after use if necessary. You are responsible when creating the OpaqueWrapper for supplying a "free" function if needed. We recommend using details::safeCommFree for the "free" function, if one is needed.
Preconditions:
rawMpiComm.get() != NULL*rawMpiComm != MPI_COMM_NULL Definition at line 678 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 765 of file Teuchos_DefaultMpiComm.hpp.
|
private |
|
inline |
Return the embedded wrapped opaque MPI_Comm object.
Definition at line 438 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 818 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 837 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 844 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 851 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 864 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Gather values from all processes to the root process.
Implements Teuchos::Comm< Ordinal >.
Definition at line 902 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 879 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 923 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 952 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1021 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1040 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1065 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1081 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Variant of ssend() that takes a message tag.
Implements Teuchos::Comm< Ordinal >.
Definition at line 1105 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1164 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1120 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Variant of readySend() that accepts a message tag.
Implements Teuchos::Comm< Ordinal >.
Definition at line 1147 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1196 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Variant of isend() that takes a tag.
Implements Teuchos::Comm< Ordinal >.
Definition at line 1218 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1240 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1263 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1505 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1517 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1541 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1559 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1579 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Implements Teuchos::Comm< Ordinal >.
Definition at line 1605 of file Teuchos_DefaultMpiComm.hpp.
|
virtual |
Reimplemented from Teuchos::Describable.
Definition at line 1673 of file Teuchos_DefaultMpiComm.hpp.
|
inlinevirtual |
The current tag.
Implements Teuchos::Comm< Ordinal >.
Definition at line 595 of file Teuchos_DefaultMpiComm.hpp.
|
private |
Definition at line 801 of file Teuchos_DefaultMpiComm.hpp.
|
private |
Definition at line 1697 of file Teuchos_DefaultMpiComm.hpp.
|
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
|
static |
Definition at line 587 of file Teuchos_DefaultMpiComm.hpp.
|
static |
Definition at line 588 of file Teuchos_DefaultMpiComm.hpp.
|
staticprivate |
Definition at line 601 of file Teuchos_DefaultMpiComm.hpp.
|
private |
The "raw" MPI_Comm (communicator).
We wrap the MPI_Comm so that it is freed automatically when its reference count goes to zero, if it does need to be freed after use by calling MPI_Comm_free. (Predefined MPI_Comm, which include but are not limited to MPI_COMM_WORLD and MPI_COMM_SELF, need not and must not be freed after use.)
Definition at line 610 of file Teuchos_DefaultMpiComm.hpp.
|
private |
The rank of the calling process.
Definition at line 613 of file Teuchos_DefaultMpiComm.hpp.
|
private |
The number of processes in the communicator.
Definition at line 616 of file Teuchos_DefaultMpiComm.hpp.
|
private |
The current tag, to use for all MPI functions that need it.
Each MpiComm instance always uses the same tag. Different MpiComm instances use different tags. The tag is set in MpiComm's constructor. Please refer to Bug 5740 for further discussion.
Definition at line 625 of file Teuchos_DefaultMpiComm.hpp.
|
private |
MPI error handler. If null, MPI uses the default error handler.
Definition at line 628 of file Teuchos_DefaultMpiComm.hpp.
1.8.11