Public Member Functions | |
| MPIComm () | |
| Empty constructor builds an object for MPI_COMM_WORLD. | |
| int | getRank () const |
| Return process rank. | |
| int | getNProc () const |
| Return number of processors in the communicator. | |
| void | synchronize () const |
| Synchronize all the processors in the communicator. | |
Collective communications | |
| void | allToAll (void *sendBuf, int sendCount, const MPIDataType &sendType, void *recvBuf, int recvCount, const MPIDataType &recvType) const |
| All-to-all gather-scatter. | |
| void | allToAllv (void *sendBuf, int *sendCount, int *sendDisplacements, const MPIDataType &sendType, void *recvBuf, int *recvCount, int *recvDisplacements, const MPIDataType &recvType) const |
| Variable-length gather-scatter. | |
| void | allReduce (void *input, void *result, int inputCount, const MPIDataType &type, const MPIOp &op) const |
| Do a collective operation, scattering the results to all processors. | |
| void | gather (void *sendBuf, int sendCount, const MPIDataType &sendType, void *recvBuf, int recvCount, const MPIDataType &recvType, int root) const |
| Gather to root. | |
| void | gatherv (void *sendBuf, int sendCount, const MPIDataType &sendType, void *recvBuf, int *recvCount, int *displacements, const MPIDataType &recvType, int root) const |
| Gather variable-sized arrays to root. | |
| void | allGather (void *sendBuf, int sendCount, const MPIDataType &sendType, void *recvBuf, int recvCount, const MPIDataType &recvType) const |
| Gather to all processors. | |
| void | allGatherv (void *sendBuf, int sendCount, const MPIDataType &sendType, void *recvBuf, int *recvCount, int *recvDisplacements, const MPIDataType &recvType) const |
| Variable-length gather to all processors. | |
| void | bcast (void *msg, int length, const MPIDataType &type, int src) const |
| Broadcast. | |
Static Public Member Functions | |
| static MPIComm & | world () |
| Get an object representing MPI_COMM_WORLD. | |
| static MPIComm & | self () |
| Get an object representing MPI_COMM_SELF. | |
| static void | errCheck (int errCode, const std::string &methodName) |
Private Member Functions | |
| void | init () |
| int | mpiIsRunning () const |
Private Attributes | |
| int | nProc_ |
| int | myRank_ |
At present, groups are not implemented so the only communicators are MPI_COMM_WORLD and MPI_COMM_SELF
Definition at line 34 of file PlayaMPIComm.hpp.
| Playa::MPIComm::MPIComm | ( | ) |
Empty constructor builds an object for MPI_COMM_WORLD.
Definition at line 18 of file PlayaMPIComm.cpp.
References init().
| void Playa::MPIComm::allGather | ( | void * | sendBuf, | |
| int | sendCount, | |||
| const MPIDataType & | sendType, | |||
| void * | recvBuf, | |||
| int | recvCount, | |||
| const MPIDataType & | recvType | |||
| ) | const |
Gather to all processors.
Definition at line 272 of file PlayaMPIComm.cpp.
References errCheck(), mpiIsRunning(), and TEUCHOS_POLL_FOR_FAILURES.
Referenced by Playa::MPIContainerComm< std::string >::allGather(), and Playa::MPIContainerComm< T >::allGather().
| void Playa::MPIComm::allGatherv | ( | void * | sendBuf, | |
| int | sendCount, | |||
| const MPIDataType & | sendType, | |||
| void * | recvBuf, | |||
| int * | recvCount, | |||
| int * | recvDisplacements, | |||
| const MPIDataType & | recvType | |||
| ) | const |
Variable-length gather to all processors.
Definition at line 300 of file PlayaMPIComm.cpp.
References errCheck(), mpiIsRunning(), and TEUCHOS_POLL_FOR_FAILURES.
Referenced by Playa::MPIContainerComm< std::string >::allGather().
| void Playa::MPIComm::allReduce | ( | void * | input, | |
| void * | result, | |||
| int | inputCount, | |||
| const MPIDataType & | type, | |||
| const MPIOp & | op | |||
| ) | const |
Do a collective operation, scattering the results to all processors.
Definition at line 352 of file PlayaMPIComm.cpp.
References errCheck(), and mpiIsRunning().
Referenced by Sundance::DOFMapBuilder::allFuncsAreOmnipresent(), Sundance::checkForFailures(), Sundance::MixedDOFMapHN::checkTable(), Sundance::MixedDOFMap::checkTable(), Sundance::FunctionalEvaluator::fdGradientCheck(), Sundance::DiscreteSpace::initVectorSpace(), Playa::ErrorPolling::pollForFailures(), Sundance::FunctionalAssemblyKernel::postLoopFinalization(), PlayaFunctors::NormInfDist< Scalar >::postProc(), PlayaFunctors::Norm1Dist< Scalar >::postProc(), PlayaFunctors::Norm2Dist< Scalar >::postProc(), PlayaFunctors::BoundedMaxLocFunctor< Scalar >::postProc(), PlayaFunctors::BoundedMinLocFunctor< Scalar >::postProc(), PlayaFunctors::Max< Scalar >::postProc(), PlayaFunctors::Min< Scalar >::postProc(), PlayaFunctors::DotProduct< Scalar >::postProc(), PlayaFunctors::NormInf< Scalar >::postProc(), PlayaFunctors::Norm1< Scalar >::postProc(), PlayaFunctors::WeightedNorm2< Scalar >::postProc(), PlayaFunctors::Norm2< Scalar >::postProc(), Sundance::reportFailure(), and Playa::ErrorPolling::reportFailure().
| void Playa::MPIComm::allToAll | ( | void * | sendBuf, | |
| int | sendCount, | |||
| const MPIDataType & | sendType, | |||
| void * | recvBuf, | |||
| int | recvCount, | |||
| const MPIDataType & | recvType | |||
| ) | const |
All-to-all gather-scatter.
Definition at line 149 of file PlayaMPIComm.cpp.
References errCheck(), mpiIsRunning(), and TEUCHOS_POLL_FOR_FAILURES.
Referenced by Playa::MPIContainerComm< T >::allToAll().
| void Playa::MPIComm::allToAllv | ( | void * | sendBuf, | |
| int * | sendCount, | |||
| int * | sendDisplacements, | |||
| const MPIDataType & | sendType, | |||
| void * | recvBuf, | |||
| int * | recvCount, | |||
| int * | recvDisplacements, | |||
| const MPIDataType & | recvType | |||
| ) | const |
Variable-length gather-scatter.
Definition at line 183 of file PlayaMPIComm.cpp.
References errCheck(), mpiIsRunning(), and TEUCHOS_POLL_FOR_FAILURES.
Referenced by Playa::MPIContainerComm< T >::allToAll().
| void Playa::MPIComm::bcast | ( | void * | msg, | |
| int | length, | |||
| const MPIDataType & | type, | |||
| int | src | |||
| ) | const |
Broadcast.
Definition at line 330 of file PlayaMPIComm.cpp.
References errCheck(), mpiIsRunning(), and TEUCHOS_POLL_FOR_FAILURES.
Referenced by Playa::MPIContainerComm< std::string >::bcast(), and Playa::MPIContainerComm< T >::bcast().
| void Playa::MPIComm::errCheck | ( | int | errCode, | |
| const std::string & | methodName | |||
| ) | [static] |
Definition at line 374 of file PlayaMPIComm.cpp.
Referenced by allGather(), allGatherv(), allReduce(), allToAll(), allToAllv(), bcast(), gather(), gatherv(), init(), and synchronize().
| void Playa::MPIComm::gather | ( | void * | sendBuf, | |
| int | sendCount, | |||
| const MPIDataType & | sendType, | |||
| void * | recvBuf, | |||
| int | recvCount, | |||
| const MPIDataType & | recvType, | |||
| int | root | |||
| ) | const |
Gather to root.
Definition at line 219 of file PlayaMPIComm.cpp.
References errCheck(), mpiIsRunning(), and TEUCHOS_POLL_FOR_FAILURES.
Referenced by Playa::MPIContainerComm< std::string >::gatherv().
| void Playa::MPIComm::gatherv | ( | void * | sendBuf, | |
| int | sendCount, | |||
| const MPIDataType & | sendType, | |||
| void * | recvBuf, | |||
| int * | recvCount, | |||
| int * | displacements, | |||
| const MPIDataType & | recvType, | |||
| int | root | |||
| ) | const |
Gather variable-sized arrays to root.
Definition at line 246 of file PlayaMPIComm.cpp.
References errCheck(), mpiIsRunning(), and TEUCHOS_POLL_FOR_FAILURES.
Referenced by Playa::MPIContainerComm< std::string >::gatherv().
| int Playa::MPIComm::getNProc | ( | ) | const [inline] |
Return number of processors in the communicator.
Definition at line 55 of file PlayaMPIComm.hpp.
References nProc_.
Referenced by Playa::MPIContainerComm< T >::accumulate(), Playa::MPIContainerComm< std::string >::allGather(), Playa::MPIContainerComm< T >::allGather(), Playa::MPIContainerComm< T >::allToAll(), Sundance::BasicSimplicialMesh::assignIntermediateCellGIDs(), Sundance::Mesh::checkCellConsistency(), Sundance::Mesh::checkVertexConsistency(), Sundance::SubmaximalNodalDOFMap::computeOffsets(), Sundance::PartialElementDOFMap::computeOffsets(), Sundance::NodalDOFMapHN::computeOffsets(), Sundance::NodalDOFMap::computeOffsets(), Playa::VectorTypeBase< Scalar >::createEvenlyPartitionedSpace(), Playa::MPIContainerComm< std::string >::gatherv(), Playa::HeatOperator1D::getOp(), Playa::HeatOperator1D::HeatOperator1D(), Sundance::HNMesh2D::HNMesh2D(), Sundance::HNMesh3D::HNMesh3D(), Sundance::InhomogeneousEdgeLocalizedDOFMap::InhomogeneousEdgeLocalizedDOFMap(), Sundance::InhomogeneousNodalDOFMap::InhomogeneousNodalDOFMap(), Sundance::RectangleDomain::init(), Sundance::LineDomain::init(), Playa::MassMatrix1D::init(), Playa::MatrixLaplacian1D::init(), Sundance::MixedDOFMapHN::initMap(), Sundance::MixedDOFMap::initMap(), Sundance::InhomogeneousDOFMapHN::initMap(), Playa::RandomSparseMatrixBuilder< Scalar >::initOp(), Sundance::MeshSourceBase::nProc(), Sundance::FieldWriterBase::nProc(), Sundance::PartitionedRectangleMesher::PartitionedRectangleMesher(), Playa::PoissonBoltzmannOp::PoissonBoltzmannOp(), Sundance::SpatiallyHomogeneousDOFMapBase::print(), Sundance::HomogeneousDOFMap::print(), Playa::Vector< Scalar >::print(), Sundance::UniformRefinementPair::refineTriMesh(), Sundance::BasicSimplicialMesh::resolveEdgeOwnership(), Sundance::LPTestSuite::run(), Sundance::serialPartition(), Playa::PoissonBoltzmannJacobian::setEvalPoint(), Sundance::MixedDOFMapHN::shareDOFs(), Sundance::MixedDOFMap::shareDOFs(), Sundance::InhomogeneousDOFMapHN::shareDOFs(), Sundance::HomogeneousDOFMap::shareDOFs(), Sundance::SubmaximalNodalDOFMap::shareRemoteDOFs(), Sundance::PartialElementDOFMap::shareRemoteDOFs(), Sundance::NodalDOFMapHN::shareRemoteDOFs(), Sundance::NodalDOFMap::shareRemoteDOFs(), Sundance::SubmaximalNodalDOFMap::SubmaximalNodalDOFMap(), Sundance::BasicSimplicialMesh::synchronizeNeighborLists(), and Sundance::VerboseFieldWriter::write().
| int Playa::MPIComm::getRank | ( | ) | const [inline] |
Return process rank.
Definition at line 52 of file PlayaMPIComm.hpp.
References myRank_.
Referenced by Sundance::BasicSimplicialMesh::addFace(), Sundance::BasicSimplicialMesh::assignIntermediateCellGIDs(), Sundance::BasicSimplicialMesh::BasicSimplicialMesh(), Playa::MPIContainerComm< std::string >::bcast(), Playa::MPIContainerComm< T >::bcast(), Sundance::Mesh::checkCellConsistency(), Sundance::Mesh::checkRemoteEntity(), Sundance::Mesh::checkVertexConsistency(), Sundance::SubmaximalNodalDOFMap::computeOffsets(), Sundance::PartialElementDOFMap::computeOffsets(), Sundance::NodalDOFMapHN::computeOffsets(), Sundance::NodalDOFMap::computeOffsets(), Sundance::MixedDOFMapHN::computeOffsets(), Sundance::MixedDOFMap::computeOffsets(), Sundance::InhomogeneousDOFMapHN::computeOffsets(), Sundance::HomogeneousDOFMap::computeOffsets(), Playa::VectorTypeBase< Scalar >::createEvenlyPartitionedSpace(), Playa::MPIContainerComm< std::string >::gatherv(), Playa::HeatOperator1D::getOp(), Playa::HeatOperator1D::HeatOperator1D(), Sundance::HNMesh2D::HNMesh2D(), Sundance::HNMesh3D::HNMesh3D(), Playa::MassMatrix1D::init(), Playa::MatrixLaplacian1D::init(), Playa::RandomSparseMatrixBuilder< Scalar >::initOp(), Sundance::MeshSourceBase::myRank(), Sundance::FieldWriterBase::myRank(), Playa::PoissonBoltzmannOp::PoissonBoltzmannOp(), Sundance::SpatiallyHomogeneousDOFMapBase::print(), Sundance::HomogeneousDOFMap::print(), Playa::Vector< Scalar >::print(), Sundance::BasicSimplicialMesh::printCells(), Sundance::BasicSimplicialMesh::resolveEdgeOwnership(), Playa::Out::root(), Playa::PoissonBoltzmannJacobian::setEvalPoint(), Playa::Rand::setLocalSeed(), Sundance::MixedDOFMapHN::shareDOFs(), Sundance::MixedDOFMap::shareDOFs(), Sundance::InhomogeneousDOFMapHN::shareDOFs(), Sundance::HomogeneousDOFMap::shareDOFs(), Sundance::SubmaximalNodalDOFMap::shareRemoteDOFs(), Sundance::PartialElementDOFMap::shareRemoteDOFs(), Sundance::NodalDOFMapHN::shareRemoteDOFs(), Sundance::NodalDOFMap::shareRemoteDOFs(), Playa::BICGSTABSolver< Scalar >::solveUnprec(), Sundance::SubmaximalNodalDOFMap::SubmaximalNodalDOFMap(), Sundance::BasicSimplicialMesh::synchronizeGIDNumbering(), Sundance::BasicSimplicialMesh::synchronizeNeighborLists(), and Sundance::VerboseFieldWriter::write().
| void Playa::MPIComm::init | ( | ) | [private] |
common initialization function, called by all ctors
Definition at line 45 of file PlayaMPIComm.cpp.
References errCheck(), mpiIsRunning(), myRank_, and nProc_.
Referenced by MPIComm().
| int Playa::MPIComm::mpiIsRunning | ( | ) | const [private] |
Indicate whether MPI is currently running
Definition at line 36 of file PlayaMPIComm.cpp.
Referenced by allGather(), allGatherv(), allReduce(), allToAll(), allToAllv(), bcast(), gather(), gatherv(), init(), and synchronize().
| MPIComm & Playa::MPIComm::self | ( | ) | [static] |
Get an object representing MPI_COMM_SELF.
Definition at line 119 of file PlayaMPIComm.cpp.
References MPIComm().
Referenced by Playa::EpetraVectorSpace::epetraCommToTeuchosMPIComm(), and Sundance::unfoldPeriodicMesh().
| void Playa::MPIComm::synchronize | ( | ) | const |
Synchronize all the processors in the communicator.
Definition at line 130 of file PlayaMPIComm.cpp.
References errCheck(), mpiIsRunning(), and TEUCHOS_POLL_FOR_FAILURES.
Referenced by Sundance::BasicSimplicialMesh::assignIntermediateCellGIDs(), Sundance::MixedDOFMapHN::computeOffsets(), Sundance::MixedDOFMap::computeOffsets(), Sundance::InhomogeneousDOFMapHN::computeOffsets(), Sundance::HomogeneousDOFMap::computeOffsets(), Sundance::SpatiallyHomogeneousDOFMapBase::print(), Sundance::HomogeneousDOFMap::print(), Playa::Vector< Scalar >::print(), and Sundance::VerboseFieldWriter::write().
| MPIComm & Playa::MPIComm::world | ( | ) | [static] |
Get an object representing MPI_COMM_WORLD.
Definition at line 112 of file PlayaMPIComm.cpp.
References MPIComm().
Referenced by Playa::HeatOperator1D::getOp(), Playa::HeatOperator1D::HeatOperator1D(), Sundance::HNMesh2D::HNMesh2D(), Sundance::HNMesh3D::HNMesh3D(), Sundance::RectangleDomain::init(), Sundance::LineDomain::init(), Playa::MassMatrix1D::init(), Playa::MatrixLaplacian1D::init(), Playa::RandomSparseMatrixBuilder< Scalar >::initOp(), Sundance::SerialPartitionerBase::makeMeshParts(), Playa::NOXSolver::NOXSolver(), Playa::OperatorBuilder< Scalar >::OperatorBuilder(), Playa::PoissonBoltzmannOp::PoissonBoltzmannOp(), Playa::Out::root(), Sundance::LPTestSuite::run(), Sundance::DoublingStepController::run(), Playa::PoissonBoltzmannJacobian::setEvalPoint(), Playa::LinearSolver< Scalar >::solve(), and Playa::BICGSTABSolver< Scalar >::solveUnprec().
int Playa::MPIComm::myRank_ [private] |
int Playa::MPIComm::nProc_ [private] |