12#if defined(HAVE_TPETRACORE_MPI)
13#include "Teuchos_DefaultMpiComm.hpp"
15#include "Teuchos_Comm.hpp"
20#if defined(HAVE_TPETRACORE_MPI)
23 (void)MPI_Initialized(&isInitialized);
35#if defined(HAVE_TPETRACORE_MPI)
38 (void)MPI_Finalized(&isFinalized);
43 return isFinalized != 0;
49#if defined(HAVE_TPETRACORE_MPI)
50bool isMpiComm(
const Teuchos::Comm<int>& comm) {
51 using mpi_comm_type = Teuchos::MpiComm<int>;
52 return dynamic_cast<const mpi_comm_type*
>(&comm) !=
nullptr;
55bool isMpiComm(
const Teuchos::Comm<int>& ) {
60int getRankHarmlessly(
const Teuchos::Comm<int>& comm) {
62 return comm.getRank();
73 const Teuchos::Comm<int>* comm) {
Declaration of Tpetra::Details::printOnce.
Struct that holds views of the contents of a CrsMatrix.
Implementation details of Tpetra.
void printOnce(std::ostream &out, const std::string &s, const Teuchos::Comm< int > *comm)
Print on one process of the given communicator, or at least try to do so (if MPI is not initialized).
bool mpiIsInitialized()
Has MPI_Init been called (on this process)?
bool mpiIsFinalized()
Has MPI_Finalize been called (on this process)?
Namespace Tpetra contains the class and methods constituting the Tpetra library.
bool isInitialized()
Whether Tpetra is in an initialized state.