42 #include <Tpetra_ConfigDefs.hpp> 49 #ifdef HAVE_TPETRA_MPI 50 # include <Tpetra_MpiPlatform.hpp> 56 comm_ (
Teuchos::createMpiComm<int> (
Teuchos::opaqueWrapper<MPI_Comm> (MPI_COMM_WORLD)))
69 comm_ (
Teuchos::createMpiComm<int> (
Teuchos::opaqueWrapper<MPI_Comm> (MPI_COMM_WORLD)))
74 MpiPlatform (
int* argc,
char*** argv,
const Teuchos::RCP<NodeType>& ) :
83 const Teuchos::RCP<
const Teuchos::OpaqueWrapper<MPI_Comm> >& rawMpiComm)
86 TEUCHOS_TEST_FOR_EXCEPTION(
87 rawMpiComm.is_null (), std::invalid_argument,
"Tpetra::MpiPlatform " 88 "constructor: The input RCP<OpaqueWrapper<MPI_Comm> > is null. That " 89 "means something different than MPI_COMM_NULL. If you want to give " 90 "MPI_COMM_NULL to this constructor, please wrap MPI_COMM_NULL in a " 91 "nonnull Teuchos::OpaqueWrapper by using the " 92 "Teuchos::opaqueWrapper<MPI_Comm>() nonmember constructor.");
93 comm_ = Teuchos::createMpiComm<int> (rawMpiComm);
99 const Teuchos::RCP<NodeType>& ,
100 const Teuchos::RCP<
const Teuchos::OpaqueWrapper<MPI_Comm> >& rawMpiComm)
103 TEUCHOS_TEST_FOR_EXCEPTION(
104 rawMpiComm.is_null (), std::invalid_argument,
"Tpetra::MpiPlatform " 105 "constructor: The input RCP<OpaqueWrapper<MPI_Comm> > is null. That " 106 "means something different than MPI_COMM_NULL. If you want to give " 107 "MPI_COMM_NULL to this constructor, please wrap MPI_COMM_NULL in a " 108 "nonnull Teuchos::OpaqueWrapper by using the " 109 "Teuchos::opaqueWrapper<MPI_Comm>() nonmember constructor.");
110 comm_ = Teuchos::createMpiComm<int> (rawMpiComm);
125 MpiPlatform (
const Teuchos::RCP<NodeType>& , MPI_Comm rawMpiComm)
126 : comm_ (
Teuchos::createMpiComm<int> (
Teuchos::opaqueWrapper<MPI_Comm> (rawMpiComm)))
133 const Teuchos::RCP<NodeType>& ,
144 Teuchos::RCP<const Teuchos::Comm<int> >
147 TEUCHOS_TEST_FOR_EXCEPTION(
148 comm_.is_null (), std::logic_error,
"Tpetra::MpiPlatform::getComm: " 149 "The default communicator is null. This should never happen. " 150 "Please report this bug to the Tpetra developers.");
154 Teuchos::RCP<MpiPlatform< ::Tpetra::Details::DefaultTypes::node_type>::NodeType>
163 #endif // HAVE_TPETRA_MPI void initialize(int *argc, char ***argv)
Initialize Tpetra.
Namespace Tpetra contains the class and methods constituting the Tpetra library.
::Kokkos::Compat::KokkosDeviceWrapperNode< execution_space > node_type
Default value of Node template parameter.
Teuchos::RCP< const Teuchos::Comm< int > > getDefaultComm()
Get Tpetra's default communicator.