Teuchos - Trilinos Tools Package
Version of the Day
|
Return a default global communicator appropriate for the build. More...
#include <Teuchos_DefaultComm.hpp>
Static Public Member Functions | |
static Teuchos::RCP< const Comm< OrdinalType > > | getComm () |
Return the default global communicator. More... | |
static Teuchos::RCP< const Comm< OrdinalType > > | getDefaultSerialComm (const Teuchos::RCP< const Comm< OrdinalType > > &comm) |
Return a serial Comm if the input Comm is null. More... | |
Return a default global communicator appropriate for the build.
Use this class to get a Comm instance representing the default global communicator. If Teuchos was built with MPI (i.e., if the HAVE_MPI macro is defined), then the default communicator wraps MPI_COMM_WORLD. Otherwise, it is a "serial" communicator (containing one process, whose rank is zero).
OrdinalType | The ordinal type for the Comm communicator wrapper template class. Comm uses OrdinalType to represent things like array lengths and indices. |
OrdinalType
is called OrdinalType
and not Ordinal
, because of a bug in Intel's C++ compiler (version 11.1). This compiler confuses the Ordinal
template parameter of DefaultComm with the Teuchos::Ordinal typedef. The Ordinal
template parameter should actually shadow the typedef in Teuchos, and it does with GCC 4.5.1, but does not with Intel's compiler. This may be the case with other compilers as well, but I haven't tested them yet. If this class' template parameter were named Ordinal
, then the following line of code would result in a compile error: Definition at line 94 of file Teuchos_DefaultComm.hpp.
|
static |
Return the default global communicator.
Definition at line 212 of file Teuchos_DefaultComm.hpp.
|
static |
Return a serial Comm if the input Comm is null.
If the input communicator comm
is null, return the default serial communicator. Otherwise, just return the input.
Definition at line 334 of file Teuchos_DefaultComm.hpp.