44#ifdef HAVE_TEUCHOS_MPI
61 const int numProcs = comm->getSize ();
64 out <<
"This test requires at least 2 MPI processes." << endl;
68 const int myRank = comm->getRank ();
76 else if (myRank == 1) {
83 reduceAll<int, int> (*comm, REDUCE_BOR, lclResult, outArg (gblResult));
Implementation of Teuchos wrappers for MPI.
#define TEST_ASSERT(v1)
Assert the given statement is true.
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
#define TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME)
Macro for defining a (non-templated) unit test.
Smart reference counting pointer class for automatic garbage collection.
Abstract interface for distributed-memory communication.
void reduceAll(const Comm< Ordinal > &comm, const ValueTypeReductionOp< Ordinal, Packet > &reductOp, const Ordinal count, const Packet sendBuffer[], Packet globalReducts[])
Wrapper for MPI_Allreduce that takes a custom reduction operator.
static Teuchos::RCP< const Comm< OrdinalType > > getComm()
Return the default global communicator.
Ptr< T > outArg(T &arg)
create a non-persisting (required or optional) output argument for a function call.
Smart reference counting pointer class for automatic garbage collection.